Commit Graph

40 Commits

Author SHA1 Message Date
Gregory Nutt
536e4d7fa6 fs/vfs: Change the return value of internal function fs_getfilep(). It no longer sets the errno variable but, rather, returns errors in the same manner as other internal OS functions. 2017-10-11 08:39:19 -06:00
Gregory Nutt
4810499d3a Squashed commit of the following:
Replace all calls to sigqueue() in the OS proper with calls to nxsig_queue() to avoid accessing the errno variable.

    sched/signal:  Add nxsig_queue() which is functionally equivalent to sigqueue() except that it does not modify the errno variable.
2017-10-07 10:57:09 -06:00
Gregory Nutt
8198ba6a6d This change renames all internal, private NuttX signal-related functions to use the prefix nxsig_ so that they cannot be confused with application interfaces that begin, primarily, with sig_
This is analogous to similar renaming that was done previously for semaphores.

Squashed commit of the following:

    sched/signal:  Fix a few compile warnings introduced by naming changes.

    sched/signal:  Rename all private, internal signl functions to use the nxsig_ prefix.

    sched/signal:  Rename sig_removependingsignal, sig_unmaskpendingsignal, and sig_mqnotempty to nxsig_remove_pendingsignal, nxsig_unmask_pendingsignal, and nxsig_mqnotempty to make it clear that these are OS internal interfaces.

    sched/signal:  Rename sig_findaction and sig_lowest to nxsig_find_action and nxsig_lowest to make it clear that these are OS internal interfaces.

    sched/signal:  Rename sig_allocatepingsigaction and sig_deliver to nxsig_alloc_pendingsigaction and nxsig_deliver to make it clear that these are OS internal interfaces.

    sched/signal:  Rename sig_cleanup, sig_release, sig_releasependingaction, and sig_releasependingsignal to nxsig_cleanup, nxsig_release, nxsig_release_pendingaction, and nxsig_release_pendingsignal to make it clear that these are OS internal interfaces.

    sched/signal:  Rename sig_tcbdispatch and sig_dispatch to nxsig_tcbdispatch and nxsig_dispatch to make it clear that these are OS internal interfaces.

    sched/signal:  Rename sig_releaseaction and sig_pendingset to nxsig_release_action and nxsig_pendingset to make it clear that these are OS internal interfaces.

    sched/signal:  Rename sig_initialize and sig_allocateactionblock to nxsig_initialize and nxsig_alloc_actionblock to make it clear that these are OS internal interfaces.
2017-10-05 13:25:25 -06:00
Gregory Nutt
9568600ab1 Squashed commit of the following:
This commit backs out most of commit b4747286b1.  That change was added because sem_wait() would sometimes cause cancellation points inappropriated.  But with these recent changes, nxsem_wait() is used instead and it is not a cancellation point.

    In the OS, all calls to sem_wait() changed to nxsem_wait().  nxsem_wait() does not return errors via errno so each place where nxsem_wait() is now called must not examine the errno variable.

    In all OS functions (not libraries), change sem_wait() to nxsem_wait().  This will prevent the OS from creating bogus cancellation points and from modifying the per-task errno variable.

    sched/semaphore:  Add the function nxsem_wait().  This is a new internal OS interface.  It is functionally equivalent to sem_wait() except that (1) it is not a cancellation point, and (2) it does not set the per-thread errno value on return.
2017-10-04 15:22:27 -06:00
Gregory Nutt
42a0796615 Squashed commit of the following:
sched/semaphore:  Add nxsem_post() which is identical to sem_post() except that it never modifies the errno variable.  Changed all references to sem_post in the OS to nxsem_post().

    sched/semaphore:  Add nxsem_destroy() which is identical to sem_destroy() except that it never modifies the errno variable.  Changed all references to sem_destroy() in the OS to nxsem_destroy().

    libc/semaphore and sched/semaphore:  Add nxsem_getprotocol() and nxsem_setprotocola which are identical to sem_getprotocol() and set_setprotocol() except that they never modifies the errno variable.  Changed all references to sem_setprotocol in the OS to nxsem_setprotocol().  sem_getprotocol() was not used in the OS
2017-10-03 15:35:24 -06:00
Gregory Nutt
83cdb0c552 Squashed commit of the following:
libc/semaphore:  Add nxsem_getvalue() which is identical to sem_getvalue() except that it never modifies the errno variable.  Changed all references to sem_getvalue in the OS to nxsem_getvalue().

    sched/semaphore:  Rename all internal private functions from sem_xyz to nxsem_xyz.  The sem_ prefix is (will be) reserved only for the application semaphore interfaces.

    libc/semaphore:  Add nxsem_init() which is identical to sem_init() except that it never modifies the errno variable.  Changed all references to sem_init in the OS to nxsem_init().

    sched/semaphore:  Rename sem_tickwait() to nxsem_tickwait() so that it is clear this is an internal OS function.

    sched/semaphoate:  Rename sem_reset() to nxsem_reset() so that it is clear this is an internal OS function.
2017-10-03 12:52:31 -06:00
Gregory Nutt
e4dd33280d Squashed commit of the following:
psock_close() and net_close() are internal OS functions and should not set the errno variable.

    psock_ioctl() and netdev_ioctl() are internal OS functions and should not set the errno variable.

    net_dupsd() and net_dupsd2() are internal OS functions and should not set the errno variable.

    net/ and fs/: net_vfcntl(), file_fcntl(), file_dup(), and file_dup2() are all internal OS interfaces and should not modify the errno value.
2017-09-30 10:41:21 -06:00
Gregory Nutt
44736b721c net/sockets: psock_send() is an internal OS interface an should not set the errno variable. 2017-09-29 17:48:15 -06:00
Gregory Nutt
7b7ca87941 fs/vfs: file_write() and file_pwrite() are internal OS interfaces and should not report errors via the errno 2017-09-28 14:49:05 -06:00
Gregory Nutt
a0f567f4a3 Update TODO, cosmetic changes, spelling -- US English spells it canceled and canceling vs cancelled and cancelling. No idea why. 2016-12-09 18:39:40 -06:00
Gregory Nutt
b0dffdc2ca Fix a number of header files with mismatched 'extern C {' and '}' 2016-11-05 07:25:05 -06:00
Gregory Nutt
986c568d34 Correct file header comments 2016-08-07 10:04:02 -06:00
Gregory Nutt
a1469a3e95 Add CONFIG_DEBUG_ERROR. Change names of *dbg() * *err() 2016-06-11 15:50:49 -06:00
Gregory Nutt
9008308b64 Remove some block comments before empty code sections 2016-04-11 18:16:04 -06:00
Gregory Nutt
849df03d22 Update dates on files modified for SIGEV_THREAD support 2015-12-30 13:28:39 -06:00
Gregory Nutt
9835eeb181 signals: Basic framework to support SIGEV_THREAD 2015-12-30 13:20:31 -06:00
Gregory Nutt
342f5fe33d Fix references to the no-longer-existent misc/ directory in comments, README files, and documentation 2015-06-28 08:08:57 -06:00
Gregory Nutt
9ab0d4c56f fs/aio: Corrrect some backward tests in aio_read() and aio_write(): Socket descriptors have higher numbers than file descriptors. In aio_contain(), Copy u.ptr (void *) when initializing aioc and not the case specific u.aioc_filep. From Michal Ulianko. 2015-02-24 07:29:47 -06:00
Gregory Nutt
9ac09db800 More fixes to problems noted by cppcheck. Some are kind of risky; some are real bugs. 2014-11-25 13:46:14 -06:00
Gregory Nutt
f8f6a8fbce AIO: Several fixes for socket transfers, mostly from Victor Mayoral Vilches 2014-10-27 15:54:35 -06:00
Gregory Nutt
d2424ac65c Fix a couple of problems introduced in the last commmits 2014-10-11 08:29:26 -06:00
Gregory Nutt
ae3cc327c7 AIO now also supports socket transfers 2014-10-11 08:15:23 -06:00
Gregory Nutt
91f5ecc347 fs/aio/aio.h needs to disable itself is CONFIG_FS_AIO is not defined 2014-10-09 10:45:43 -06:00
Gregory Nutt
974f884ddc Fix typos that cause compile error when file system debug is enabled 2014-10-07 13:49:49 -06:00
Gregory Nutt
e5f34875ff AIO signal related fixes; extensino to AIO test 2014-10-07 09:57:20 -06:00
Gregory Nutt
f575567f55 Fix a compilation error in last commits that occure if CONFIG_PRIORITY_INHERITANCE is not selected 2014-10-07 09:07:54 -06:00
Gregory Nutt
4c7b988525 Update some comments 2014-10-07 08:34:10 -06:00
Gregory Nutt
98a4b6fb79 The Asynch I/O implementation now satisfies POSIX priority requirements; it uses the new low priority worker thread interfaces to adjust the priority of the worker thread according to the priority of the client thread 2014-10-07 08:24:50 -06:00
Gregory Nutt
e38640ecd8 Eliminate a warning 2014-10-06 16:15:24 -06:00
Gregory Nutt
9e102bc458 Fix some cornercase locking issues; make AIO lock re-entrant 2014-10-06 15:54:00 -06:00
Gregory Nutt
67030f9049 Add test for aio_cancel() and fix some bugs found by the test 2014-10-06 15:06:01 -06:00
Gregory Nutt
b447c413d0 Fix some errors and spec compliance issues with aio_cancel() 2014-10-06 14:28:40 -06:00
Gregory Nutt
7cbe29e7db Fix compile problems with debug on 2014-10-06 12:28:37 -06:00
Gregory Nutt
cd0c493657 Basic fixes for a clean simulator build with last big fs changes 2014-10-06 11:02:58 -06:00
Gregory Nutt
d914f3ceec Major structure of file system functions to better support asynchronous I/O. Respository should not be trusted until I have a chance to verify everything 2014-10-06 10:53:25 -06:00
Gregory Nutt
a5b4a4161b Modify logic to use AIO control block container 2014-10-06 08:10:32 -06:00
Gregory Nutt
52ce95b8b8 Add a AIO control container to increase the payload with OS internal stuff. 2014-10-06 08:10:02 -06:00
Gregory Nutt
e8a2e3a506 Fix some compilation issues introduced with last commit 2014-10-05 16:04:19 -06:00
Gregory Nutt
652d3ed29d Rename CONFIG_LIBC_AIO to CONFIG_FS_AIO since it is now an OS property 2014-10-05 15:44:43 -06:00
Gregory Nutt
f73a18ae39 Move all file operations from libc/aio to fs/aio. These will need to be kernel routines in order to handler issues with using file descriptors on worker thread 2014-10-05 15:33:31 -06:00