[PATCH v2] libio: Add hold/drop iop reference

2017-09-13 Thread Sebastian Huber
Check iop reference count in close() and return -1 with errno set to EBUSY in case the file descriptor is still in use. Update #3132. --- v2: Add test fsclose01. cpukit/libcsupport/include/rtems/libio.h | 8 +- cpukit/libcsupport/include/rtems/libio_.h | 71 ++-- cpukit/libcsupport/src/clo

Re: [PATCH] *** Covoar Windows Build Failure. ***

2017-09-13 Thread Chris Johns
On 14/09/2017 01:45, Cillian O'Donnell wrote: > *** The build is successfull if I run ./waf -v however the build fails on > a normal ./waf command as it can't link to -lelf > 4-mingw32/bin/ld.exe: cannot find -lelf > Has anyone seen this behaviour before were it only builds in verbose mode?*** I

Re: LLVM/clang status?

2017-09-13 Thread Joel Sherrill
Daniel Hellstrom should ready speak up. They have it working for SPARC. I don't know if anything special is needed for other targets so it should just be a matter of attempting it and seeing On Sep 13, 2017 6:46 PM, "Gedare Bloom" wrote: > I've seen some discussion about using clang to compile a

LLVM/clang status?

2017-09-13 Thread Gedare Bloom
I've seen some discussion about using clang to compile a few targets. Is there any documentation about what is known to work/not work, and any additional directions needed to be successful? -Gedare ___ devel mailing list devel@rtems.org http://lists.rtem

[PATCH 05/18] libio: Avoid direct use of rtems_libio_iops

2017-09-13 Thread Sebastian Huber
Update #3132. --- cpukit/libmisc/serdbg/serdbgio.c | 2 +- cpukit/libmisc/serdbg/termios_printk.c | 2 +- cpukit/libnetworking/rtems/rtems_syscall.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cpukit/libmisc/serdbg/serdbgio.c b/cpukit/libmisc/serdbg/serdbgi

[PATCH 11/18] libio: Add rtems_libio_iop_flags()

2017-09-13 Thread Sebastian Huber
Update #3082. --- cpukit/libcsupport/include/rtems/libio.h | 5 + cpukit/libcsupport/src/fcntl.c | 10 +- cpukit/libfs/src/pipe/fifo.c | 2 +- cpukit/libnetworking/rtems/rtems_syscall.c | 2 +- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git

[PATCH 08/18] libio: rtems_libio_check_permissions_with_error()

2017-09-13 Thread Sebastian Huber
Rename rtems_libio_check_permissions_with_error() in rtems_libio_check_permissions(). Update #3132. --- cpukit/libcsupport/include/rtems/libio_.h | 6 +++--- cpukit/libcsupport/src/fdatasync.c| 2 +- cpukit/libcsupport/src/ftruncate.c| 2 +- cpukit/libcsupport/src/read.c

[PATCH 16/18] libio: LIBIO_GET_IOP() LIBIO_GET_IOP_WITH_ACCESS()

2017-09-13 Thread Sebastian Huber
Replace rtems_libio_check_fd(), rtems_libio_iop(), rtems_libio_check_open() and rtems_libio_check_permissions() combinations with new LIBIO_GET_IOP() and LIBIO_GET_IOP_WITH_ACCESS() macros. Update #3082. --- cpukit/libcsupport/include/rtems/libio_.h | 78 +- cpukit/li

[PATCH 14/18] libio: Add rtems_libio_iop_is_writeable()

2017-09-13 Thread Sebastian Huber
Update #3082. --- cpukit/libcsupport/include/rtems/libio.h | 10 ++ cpukit/libfs/src/imfs/imfs_linfile.c | 2 +- cpukit/libnetworking/lib/ftpfs.c | 4 ++-- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/cpukit/libcsupport/include/rtems/libio.h b/cpukit/libcs

[PATCH 03/18] libio: Remove LIBIO_FLAGS_CREATE

2017-09-13 Thread Sebastian Huber
Close #3134. --- cpukit/libcsupport/include/rtems/libio.h | 1 - cpukit/libcsupport/src/fcntl.c | 2 -- cpukit/libcsupport/src/libio.c | 5 - 3 files changed, 8 deletions(-) diff --git a/cpukit/libcsupport/include/rtems/libio.h b/cpukit/libcsupport/include/rtems/libio.h i

[PATCH 17/18] libio: Unify readv() and writev()

2017-09-13 Thread Sebastian Huber
Update #3082. --- cpukit/libcsupport/include/rtems/libio_.h | 22 -- cpukit/libcsupport/src/readv.c| 27 +-- cpukit/libcsupport/src/writev.c | 27 +-- 3 files changed, 50 insertions(+), 26 deletions(-) diff

[PATCH 18/18] libio: Add hold/drop iop reference

2017-09-13 Thread Sebastian Huber
Update #3132. --- cpukit/libcsupport/include/rtems/libio.h | 8 ++-- cpukit/libcsupport/include/rtems/libio_.h | 71 +-- cpukit/libcsupport/src/close.c| 41 -- cpukit/libcsupport/src/fchdir.c | 1 + cpukit/libcsupport/src/fchmod.

[PATCH 09/18] libio: Add iop set/clear flags

2017-09-13 Thread Sebastian Huber
Update #3132. --- cpukit/libcsupport/include/rtems/libio_.h | 40 ++ cpukit/libcsupport/src/close.c | 2 +- cpukit/libcsupport/src/fcntl.c | 11 cpukit/libcsupport/src/open.c | 2 +- cpukit/libfs/src/imfs/imfs_fifo.c

[PATCH 06/18] libio: Do simple parameter checks early

2017-09-13 Thread Sebastian Huber
Update #3132. --- cpukit/libcsupport/include/rtems/libio_.h | 14 +++--- cpukit/libcsupport/src/read.c | 5 +++-- cpukit/libcsupport/src/write.c| 7 --- testsuites/psxtests/psxfile02/init.c | 12 +--- 4 files changed, 23 insertions(+), 15 deletion

[PATCH 04/18] libio: Simplify rtems_libio_iop()

2017-09-13 Thread Sebastian Huber
Remove the file descriptor validation. This is the job of rtems_libio_check_fd(). Use an inline function instread of a macro. Update #3132. --- cpukit/libcsupport/include/rtems/libio_.h | 20 +--- cpukit/libcsupport/src/fstat.c| 2 +- 2 files changed, 14 insertions(

[PATCH 15/18] libio: Add rtems_libio_iop_is_append()

2017-09-13 Thread Sebastian Huber
Update #3082. --- cpukit/libcsupport/include/rtems/libio.h| 10 ++ cpukit/libfs/src/dosfs/msdos_file.c | 2 +- cpukit/libfs/src/imfs/imfs_memfile.c| 2 +- cpukit/libfs/src/jffs2/src/fs-rtems.c | 6 +++--- cpukit/libfs/src/nfsclient/src/nfs.c| 2 +- cpu

[PATCH 13/18] libio: Add rtems_libio_iop_is_readable()

2017-09-13 Thread Sebastian Huber
Update #3082. --- c/src/lib/libbsp/shared/console.c| 4 ++-- cpukit/libcsupport/include/rtems/libio.h | 10 ++ cpukit/libnetworking/lib/ftpfs.c | 2 +- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/c/src/lib/libbsp/shared/console.c b/c/src/lib/libbsp/sh

[PATCH 12/18] libio: Add rtems_libio_iop_is_no_delay()

2017-09-13 Thread Sebastian Huber
Update #3082. --- cpukit/libcsupport/include/rtems/libio.h | 10 ++ cpukit/libcsupport/src/termios.c | 2 +- cpukit/libfs/src/pipe/fifo.c | 2 +- cpukit/libnetworking/rtems/rtems_syscall.c | 2 +- 4 files changed, 13 insertions(+), 3 deletions(-) diff --git a/

[PATCH 10/18] libio: Add flags to rtems_libio_allocate()

2017-09-13 Thread Sebastian Huber
Update #3082. --- cpukit/libcsupport/include/rtems/libio_.h | 2 +- cpukit/libcsupport/src/fcntl.c | 11 +-- cpukit/libcsupport/src/libio.c | 4 ++-- cpukit/libcsupport/src/open.c | 3 +-- cpukit/libnetworking/rtems/rtems_syscall.c | 3 +-- cpukit/

[PATCH 01/18] bsp/mrm332: Remove dead code

2017-09-13 Thread Sebastian Huber
Update #3132. --- c/src/lib/libbsp/m68k/mrm332/console/sci.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/c/src/lib/libbsp/m68k/mrm332/console/sci.c b/c/src/lib/libbsp/m68k/mrm332/console/sci.c index 8e44f22084..c6b4933f13 100644 --- a/c/src/lib/libbsp/m68k/mrm332/console/sci.c +++ b/c/sr

[PATCH 02/18] fstests/fsimfsgeneric01: Fix test assert

2017-09-13 Thread Sebastian Huber
--- testsuites/fstests/fsimfsgeneric01/init.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/testsuites/fstests/fsimfsgeneric01/init.c b/testsuites/fstests/fsimfsgeneric01/init.c index 56a9369b16..45d6d1cc2d 100644 --- a/testsuites/fstests/fsimfsgeneric01/init.c +++ b/tests

[PATCH 07/18] libio: Remove rtems_libio_check_permissions()

2017-09-13 Thread Sebastian Huber
Remove rtems_libio_check_permissions() and convert single user to rtems_libio_check_permissions_with_error(). Update #3132. --- cpukit/libcsupport/include/rtems/libio_.h | 10 -- cpukit/libcsupport/src/ftruncate.c| 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --gi

[PATCH] covoar: Add function defs to fix Windows build errors.

2017-09-13 Thread Cillian O'Donnell
Closes #3129 --- tester/covoar/DesiredSymbols.cc | 2 +- tester/covoar/ReportsBase.cc| 4 ++-- tester/covoar/TraceConverter.cc | 4 tester/covoar/covoar.cc | 4 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/tester/covoar/DesiredSymbols.cc b/tester/covoar/Des

[PATCH] *** Covoar Windows Build Failure. ***

2017-09-13 Thread Cillian O'Donnell
*** The build is successfull if I run ./waf -v however the build fails on a normal ./waf command as it can't link to -lelf 4-mingw32/bin/ld.exe: cannot find -lelf Has anyone seen this behaviour before were it only builds in verbose mode?*** Cillian O'Donnell (1): covoar: Add function defs to f

Re: [PATCH] libio: Remove special-case reference count

2017-09-13 Thread Gedare Bloom
On Tue, Sep 12, 2017 at 1:04 AM, Sebastian Huber wrote: > > > On 11/09/17 20:34, Gedare Bloom wrote: >> >> On Fri, Sep 8, 2017 at 1:04 AM, Sebastian Huber >> wrote: >>> >>> On 08/09/17 00:08, Gedare Bloom wrote: >>> I understand the motivation. I need to look carefully at whether this

Re: [PATCH] posix: Ignore pshared for semaphores

2017-09-13 Thread Sebastian Huber
On 12/09/17 15:58, Gedare Bloom wrote: On Tue, Sep 12, 2017 at 1:10 AM, Sebastian Huber wrote: On 11/09/17 16:03, Sebastian Huber wrote: - Joel Sherrill schrieb: On Fri, Sep 8, 2017 at 1:51 PM, Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: Ok, but why do you think tha

Re: [PATCH] posix: Ignore pshared for semaphores

2017-09-13 Thread Gedare Bloom
On Tue, Sep 12, 2017 at 10:04 AM, Sebastian Huber wrote: > On 12/09/17 15:58, Gedare Bloom wrote: > >> On Tue, Sep 12, 2017 at 1:10 AM, Sebastian Huber >> wrote: >>> >>> On 11/09/17 16:03, Sebastian Huber wrote: >>> - Joel Sherrill schrieb: > > On Fri, Sep 8, 2017 at 1:51 PM, Se

Re: [PATCH] posix: Ignore pshared for semaphores

2017-09-13 Thread Sebastian Huber
On 12/09/17 17:07, Joel Sherrill wrote: Sure. I still think it is wrong for an RTEMS application to set it to shared since there isn't another process to share it with but it seems to be compliant. This makes porting of applications not originally designed for RTEMS a bit easier. -- Sebast

Re: [PATCH] posix: Ignore pshared for semaphores

2017-09-13 Thread Gedare Bloom
On Tue, Sep 12, 2017 at 1:10 AM, Sebastian Huber wrote: > On 11/09/17 16:03, Sebastian Huber wrote: > >> - Joel Sherrill schrieb: >>> >>> On Fri, Sep 8, 2017 at 1:51 PM, Sebastian Huber < >>> sebastian.hu...@embedded-brains.de> wrote: >>> Ok, but why do you think that this is an error?

Re: [PATCH] posix: Ignore pshared for semaphores

2017-09-13 Thread Joel Sherrill
On Sep 12, 2017 11:56 PM, "Sebastian Huber" < sebastian.hu...@embedded-brains.de> wrote: On 12/09/17 17:07, Joel Sherrill wrote: Sure. I still think it is wrong for an RTEMS application to set it to > shared since there isn't another process to share it with but it seems to > be compliant. > Thi

Re: [PATCH] posix: Ignore pshared for semaphores

2017-09-13 Thread Joel Sherrill
Sure. I still think it is wrong for an RTEMS application to set it to shared since there isn't another process to share it with but it seems to be compliant. On Sep 12, 2017 10:03 AM, "Gedare Bloom" wrote: > On Tue, Sep 12, 2017 at 10:04 AM, Sebastian Huber > wrote: > > On 12/09/17 15:58, Gedar