Update TODO, cosmetic changes, spelling -- US English spells it canceled and canceling vs cancelled and cancelling. No idea why.
This commit is contained in:
parent
03a58b2ebc
commit
a0f567f4a3
30
TODO
30
TODO
@ -595,34 +595,34 @@ o pthreads (sched/pthreads)
|
|||||||
the following functions. There are some execptions as noted:
|
the following functions. There are some execptions as noted:
|
||||||
|
|
||||||
accept() mq_timedsend() NA putpmsg() sigtimedwait()
|
accept() mq_timedsend() NA putpmsg() sigtimedwait()
|
||||||
-4 aio_suspend() NA msgrcv() pwrite() NA sigwait()
|
04 aio_suspend() NA msgrcv() pwrite() NA sigwait()
|
||||||
NA clock_nanosleep() NA msgsnd() read() sigwaitinfo()
|
NA clock_nanosleep() NA msgsnd() read() sigwaitinfo()
|
||||||
close() NA msync() NA readv() -1 sleep()
|
close() NA msync() NA readv() 01 sleep()
|
||||||
connect() nanosleep() recv() -2 system()
|
connect() nanosleep() recv() 02 system()
|
||||||
OK creat() open() recvfrom() NA tcdrain()
|
-- creat() open() recvfrom() NA tcdrain()
|
||||||
fcntl() pause() NA recvmsg() -1 usleep()
|
fcntl() pause() NA recvmsg() 01 usleep()
|
||||||
NA fdatasync() poll() select() OK wait()
|
NA fdatasync() poll() select() -- wait()
|
||||||
fsync() pread() sem_timedwait() waitid()
|
fsync() pread() sem_timedwait() waitid()
|
||||||
NA getmsg() NA pselect() sem_wait() waitpid()
|
NA getmsg() NA pselect() sem_wait() waitpid()
|
||||||
NA getpmsg() pthread_cond_timedwait() send() write()
|
NA getpmsg() pthread_cond_timedwait() send() write()
|
||||||
NA lockf() pthread_cond_wait() NA sendmsg() NA writev()
|
NA lockf() pthread_cond_wait() NA sendmsg() NA writev()
|
||||||
mq_receive() pthread_join() sendto()
|
mq_receive() pthread_join() sendto()
|
||||||
mq_send() pthread_testcancel() -3 sigpause()
|
mq_send() pthread_testcancel() 03 sigpause()
|
||||||
mq_timedreceive() NA putmsg() sigsuspend()
|
mq_timedreceive() NA putmsg() sigsuspend()
|
||||||
|
|
||||||
NA Not supported
|
NA Not supported
|
||||||
OK Doesn't need instrumentation. Handled by lower level calls.
|
-- Doesn't need instrumentation. Handled by lower level calls.
|
||||||
-n See note n
|
nn See note nn
|
||||||
|
|
||||||
NOTE 1: sleep() and usleep() are user-space functions in the C library and cannot
|
NOTE 01: sleep() and usleep() are user-space functions in the C library and cannot
|
||||||
serve as cancellation points. They are, however, simple wrappers around nanosleep
|
serve as cancellation points. They are, however, simple wrappers around nanosleep
|
||||||
which is a true cancellation point.
|
which is a true cancellation point.
|
||||||
NOTE 2: system() is actually implemented in apps/ as part of NSH. It cannot be
|
NOTE 02: system() is actually implemented in apps/ as part of NSH. It cannot be
|
||||||
a cancellation point either.
|
a cancellation point either.
|
||||||
NOTE 3: sigpause() is a user-space function in the C library and cannot serve as
|
NOTE 03: sigpause() is a user-space function in the C library and cannot serve as
|
||||||
cancellation points. It is, however, a simple wrapper around sigsuspend()
|
cancellation points. It is, however, a simple wrapper around sigsuspend()
|
||||||
which is a true cancellation point.
|
which is a true cancellation point.
|
||||||
NOTE 4: aio_suspend() is a user-space function in the C library and cannot serve as
|
NOTE 04: aio_suspend() is a user-space function in the C library and cannot serve as
|
||||||
cancellation points. It does call around sigtimedwait() which is a true cancellation
|
cancellation points. It does call around sigtimedwait() which is a true cancellation
|
||||||
point.
|
point.
|
||||||
Status: Not really open. This is just the way it is.
|
Status: Not really open. This is just the way it is.
|
||||||
@ -1530,7 +1530,7 @@ o Libraries (libc/, libm/)
|
|||||||
Description: There are many things implemented within the kernel (for example
|
Description: There are many things implemented within the kernel (for example
|
||||||
under sched/pthread) that probably should be migrated in the
|
under sched/pthread) that probably should be migrated in the
|
||||||
C library where it belongs.
|
C library where it belongs.
|
||||||
Status: Open
|
Status: Ope
|
||||||
Priority: Low
|
Priority: Low
|
||||||
|
|
||||||
o File system / Generic drivers (fs/, drivers/)
|
o File system / Generic drivers (fs/, drivers/)
|
||||||
|
@ -61,30 +61,30 @@
|
|||||||
* The aio_cancel() function attempts to cancel one or more asynchronous
|
* The aio_cancel() function attempts to cancel one or more asynchronous
|
||||||
* I/O requests currently outstanding against file descriptor 'fildes'.
|
* I/O requests currently outstanding against file descriptor 'fildes'.
|
||||||
* The aiocbp argument points to the asynchronous I/O control block for
|
* The aiocbp argument points to the asynchronous I/O control block for
|
||||||
* a particular request to be cancelled. If aiocbp is NULL, then all
|
* a particular request to be canceled. If aiocbp is NULL, then all
|
||||||
* outstanding cancelable asynchronous I/O requests against fildes will
|
* outstanding cancelable asynchronous I/O requests against fildes will
|
||||||
* be cancelled.
|
* be canceled.
|
||||||
*
|
*
|
||||||
* Normal asynchronous notification will occur for asynchronous I/O
|
* Normal asynchronous notification will occur for asynchronous I/O
|
||||||
* operations that are successfully cancelled. If there are requests that
|
* operations that are successfully canceled. If there are requests that
|
||||||
* cannot be cancelled, then the normal asynchronous completion process
|
* cannot be canceled, then the normal asynchronous completion process
|
||||||
* will take place for those requests when they are completed.
|
* will take place for those requests when they are completed.
|
||||||
*
|
*
|
||||||
* For requested operations that are successfully cancelled, the associated
|
* For requested operations that are successfully canceled, the associated
|
||||||
* error status will be set to ECANCELED and the return status will be -1.
|
* error status will be set to ECANCELED and the return status will be -1.
|
||||||
* For requested operations that are not successfully cancelled, the aiocbp
|
* For requested operations that are not successfully canceled, the aiocbp
|
||||||
* will not be modified by aio_cancel().
|
* will not be modified by aio_cancel().
|
||||||
*
|
*
|
||||||
* Input Parameters:
|
* Input Parameters:
|
||||||
* fildes - Not used in this implementation
|
* fildes - Not used in this implementation
|
||||||
* aiocbp - Points to the asynchronous I/O control block for a particular
|
* aiocbp - Points to the asynchronous I/O control block for a particular
|
||||||
* request to be cancelled.
|
* request to be canceled.
|
||||||
*
|
*
|
||||||
* Returned Value:
|
* Returned Value:
|
||||||
* The aio_cancel() function will return the value AIO_CANCELED if the
|
* The aio_cancel() function will return the value AIO_CANCELED if the
|
||||||
* requested operation(s) were cancelled. The value AIO_NOTCANCELED will
|
* requested operation(s) were canceled. The value AIO_NOTCANCELED will
|
||||||
* be returned if at least one of the requested operation(s) cannot be
|
* be returned if at least one of the requested operation(s) cannot be
|
||||||
* cancelled because it is in progress. In this case, the state of the
|
* canceled because it is in progress. In this case, the state of the
|
||||||
* other operations, if any, referenced in the call to aio_cancel() is
|
* other operations, if any, referenced in the call to aio_cancel() is
|
||||||
* not indicated by the return value of aio_cancel(). The application
|
* not indicated by the return value of aio_cancel(). The application
|
||||||
* may determine the state of affairs for these operations by using
|
* may determine the state of affairs for these operations by using
|
||||||
@ -133,7 +133,7 @@ int aio_cancel(int fildes, FAR struct aiocb *aiocbp)
|
|||||||
* possibilities:* (1) the work has already been started and
|
* possibilities:* (1) the work has already been started and
|
||||||
* is no longer queued, or (2) the work has not been started
|
* is no longer queued, or (2) the work has not been started
|
||||||
* and is still in the work queue. Only the second case can
|
* and is still in the work queue. Only the second case can
|
||||||
* be cancelled. work_cancel() will return -ENOENT in the
|
* be canceled. work_cancel() will return -ENOENT in the
|
||||||
* first case.
|
* first case.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -177,7 +177,7 @@ int aio_cancel(int fildes, FAR struct aiocb *aiocbp)
|
|||||||
* possibilities:* (1) the work has already been started and
|
* possibilities:* (1) the work has already been started and
|
||||||
* is no longer queued, or (2) the work has not been started
|
* is no longer queued, or (2) the work has not been started
|
||||||
* and is still in the work queue. Only the second case can
|
* and is still in the work queue. Only the second case can
|
||||||
* be cancelled. work_cancel() will return -ENOENT in the
|
* be canceled. work_cancel() will return -ENOENT in the
|
||||||
* first case.
|
* first case.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
@ -226,7 +226,7 @@ static void aio_read_worker(FAR void *arg)
|
|||||||
* aiocbp->aio_nbytes is an invalid value.
|
* aiocbp->aio_nbytes is an invalid value.
|
||||||
*
|
*
|
||||||
* In the case that the aio_read() successfully queues the I/O operation
|
* In the case that the aio_read() successfully queues the I/O operation
|
||||||
* but the operation is subsequently cancelled or encounters an error, the
|
* but the operation is subsequently canceled or encounters an error, the
|
||||||
* return status of the asynchronous operation is one of the values
|
* return status of the asynchronous operation is one of the values
|
||||||
* normally returned by the read() function call. In addition, the error
|
* normally returned by the read() function call. In addition, the error
|
||||||
* status of the asynchronous operation is set to one of the error
|
* status of the asynchronous operation is set to one of the error
|
||||||
@ -235,7 +235,7 @@ static void aio_read_worker(FAR void *arg)
|
|||||||
*
|
*
|
||||||
* EBADF - The aiocbp->aio_fildes argument is not a valid file descriptor
|
* EBADF - The aiocbp->aio_fildes argument is not a valid file descriptor
|
||||||
* open for reading.
|
* open for reading.
|
||||||
* ECANCELED - The requested I/O was cancelled before the I/O completed
|
* ECANCELED - The requested I/O was canceled before the I/O completed
|
||||||
* due to an explicit aio_cancel() request.
|
* due to an explicit aio_cancel() request.
|
||||||
* EINVAL - The file offset value implied by aiocbp->aio_offset would be
|
* EINVAL - The file offset value implied by aiocbp->aio_offset would be
|
||||||
* invalid.
|
* invalid.
|
||||||
|
@ -279,7 +279,7 @@ errout:
|
|||||||
* aiocbp->aio_nbytes is an invalid value.
|
* aiocbp->aio_nbytes is an invalid value.
|
||||||
*
|
*
|
||||||
* In the case that the aio_write() successfully queues the I/O operation
|
* In the case that the aio_write() successfully queues the I/O operation
|
||||||
* but the operation is subsequently cancelled or encounters an error, the
|
* but the operation is subsequently canceled or encounters an error, the
|
||||||
* return status of the asynchronous operation is one of the values
|
* return status of the asynchronous operation is one of the values
|
||||||
* normally returned by the write() function call. In addition, the error
|
* normally returned by the write() function call. In addition, the error
|
||||||
* status of the asynchronous operation is set to one of the error
|
* status of the asynchronous operation is set to one of the error
|
||||||
@ -290,7 +290,7 @@ errout:
|
|||||||
* open for writing.
|
* open for writing.
|
||||||
* EINVAL - The file offset value implied by aiocbp->aio_offset would be
|
* EINVAL - The file offset value implied by aiocbp->aio_offset would be
|
||||||
* invalid.
|
* invalid.
|
||||||
* ECANCELED - The requested I/O was cancelled before the I/O completed
|
* ECANCELED - The requested I/O was canceled before the I/O completed
|
||||||
* due to an explicit aio_cancel() request.
|
* due to an explicit aio_cancel() request.
|
||||||
*
|
*
|
||||||
* The following condition may be detected synchronously or asynchronously:
|
* The following condition may be detected synchronously or asynchronously:
|
||||||
|
@ -485,7 +485,7 @@ static int automount_interrupt(FAR const struct automount_lower_s *lower,
|
|||||||
/* Queue work to occur after a delay. The delays performs debouncing:
|
/* Queue work to occur after a delay. The delays performs debouncing:
|
||||||
* If the insertion/removal detection logic has "chatter", then we may
|
* If the insertion/removal detection logic has "chatter", then we may
|
||||||
* receive this interrupt numerous times. Each time, the previous work
|
* receive this interrupt numerous times. Each time, the previous work
|
||||||
* will be cancelled (above) and the new work will scheduled with the
|
* will be canceled (above) and the new work will scheduled with the
|
||||||
* delay. So the final mount operation will not be performed until the
|
* delay. So the final mount operation will not be performed until the
|
||||||
* insertion state is stable for that delay.
|
* insertion state is stable for that delay.
|
||||||
*/
|
*/
|
||||||
|
@ -107,7 +107,11 @@ int pthread_cond_wait(FAR pthread_cond_t *cond, FAR pthread_mutex_t *mutex)
|
|||||||
ret |= pthread_takesemaphore((FAR sem_t *)&cond->sem);
|
ret |= pthread_takesemaphore((FAR sem_t *)&cond->sem);
|
||||||
sched_unlock();
|
sched_unlock();
|
||||||
|
|
||||||
/* Reacquire the mutex */
|
/* Reacquire the mutex.
|
||||||
|
*
|
||||||
|
* REVISIT: When cancellation points are enabled, we will almost
|
||||||
|
* certainly hold the mutex when the pthread is canceled.
|
||||||
|
*/
|
||||||
|
|
||||||
sinfo("Reacquire mutex...\n");
|
sinfo("Reacquire mutex...\n");
|
||||||
ret |= pthread_takesemaphore((FAR sem_t *)&mutex->sem);
|
ret |= pthread_takesemaphore((FAR sem_t *)&mutex->sem);
|
||||||
|
@ -75,7 +75,7 @@ int pthread_mutex_destroy(FAR pthread_mutex_t *mutex)
|
|||||||
|
|
||||||
sinfo("mutex=0x%p\n", mutex);
|
sinfo("mutex=0x%p\n", mutex);
|
||||||
|
|
||||||
if (!mutex)
|
if (mutex == NULL)
|
||||||
{
|
{
|
||||||
ret = EINVAL;
|
ret = EINVAL;
|
||||||
}
|
}
|
||||||
@ -100,7 +100,7 @@ int pthread_mutex_destroy(FAR pthread_mutex_t *mutex)
|
|||||||
ret = kill(mutex->pid, 0);
|
ret = kill(mutex->pid, 0);
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
/* That thread associated with the PID no longer exists */
|
/* The thread associated with the PID no longer exists */
|
||||||
|
|
||||||
mutex->pid = -1;
|
mutex->pid = -1;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user