summaryrefslogtreecommitdiffstats
path: root/lib/libpthread/thread/thr_sem.c
Commit message (Collapse)AuthorAgeFilesLines
* The second call to _thread_kern_sig_defer() in sem_post() should be a calljasone2000-08-231-1/+1
| | | | to _thread_kern_sig_undefer().
* Make sem_post() safe to call from within a signal handler, as required byjasone2000-08-011-0/+7
| | | | POSIX/SUSv2.
* Change my email address in the copyright notices for the sake of consistencyjasone2000-07-181-1/+1
| | | | (jasone@canonware.com --> jasone@freebsd.org).
* For errors, return -1 and set errno to indicate the error type, rather thanjasone2000-02-161-16/+33
| | | | | | | | | returning the error directly. For sem_post(), make sure that the correct thread is woken up. This has unfortunate performance implications, but is necessary for POSIX compliance. Approved by: jkh
* Simplify sytem call renaming. Instead of _foo() <-- _libc_foo <-- foo(),jasone2000-01-271-0/+3
| | | | | | | | | | | | | | | | | just use _foo() <-- foo(). In the case of a libpthread that doesn't do call conversion (such as linuxthreads and our upcoming libpthread), this is adequate. In the case of libc_r, we still need three names, which are now _thread_sys_foo() <-- _foo() <-- foo(). Convert all internal libc usage of: aio_suspend(), close(), fsync(), msync(), nanosleep(), open(), fcntl(), read(), and write() to _foo() instead of foo(). Remove all internal libc usage of: creat(), pause(), sleep(), system(), tcdrain(), wait(), and waitpid(). Make thread cancellation fully POSIX-compliant. Suggested by: deischen
* Add sem_*() functions. Named semaphores and process-shared semaphoresjasone2000-01-201-0/+224
are not supported by this implementation, and the error return values from sem_init(), sem_open(), sem_close(), and sem_unlink() reflect this. Approved by: jkh
OpenPOWER on IntegriCloud