summaryrefslogtreecommitdiffstats
path: root/lib/libc/gen/_pthread_stubs.c
Commit message (Collapse)AuthorAgeFilesLines
* Argh, change declaration of two-dimensional array so that it actuallydeischen2002-11-131-1/+1
| | | | builds.
* Use a jump table (a la Solaris) for pthread routines with defaultdeischen2002-11-131-387/+160
| | | | | | | | | | entries in the table being stubs. While I'm here, add macros to auto-generate the stubs. A conforming threads library can override the stub routines by filling in the jump table. Add some entries to namespace.h and sync un-namespace.h to it. Also add a comment to remind folks to update un-namespace.h when changing namespace.h.
* * Add stubs for pthread_cond_broadcast.dfr2002-11-011-28/+243
| | | | | | | | | | * Fix typos in rwlock stubs. * Add pthread_XXX counterparts to the _pthread_XXX stubs which libraries like libX11 can use to ensure thread-safety without requiring the use of a thread library. Submitted by: Terry Lambert (pthread_cond_broadcast) Reviewed by: deischen
* add a stub for pthread_cond_destroy.alfred2002-09-191-0/+7
|
* Fix SCM ID's.obrien2002-02-011-2/+3
|
* Make the non-threaded stub for pthread_sigmask() a no-op insteadiedowse2001-06-111-6/+1
| | | | | | | | | | | | | of calling sigprocmask(). This matches the behaviour of thr_sigsetmask() on Solaris; _pthread_sigmask_stub was added purely for compatibility with Solaris (for TI-RPC), so it might as well do the same thing. This fixes the problem where client RPC calls ignored all signals for the complete duration of the RPC. This behaviour is currently necessary in the threaded case due to locking issues, but was never intended to occur in non-threaded programs. Reviewed by: deischen
* To be consistent, use the __weak_reference macro from <sys/cdefs.h>deischen2001-04-101-27/+26
| | | | | | | | instead of #pragma weak to create weak definitions. This macro is improperly named, though, since a weak definition is not the same thing as a weak reference. Suggested by: bde
* Bring in a hybrid of SunSoft's transport-independent RPC (TI-RPC) andalfred2001-03-191-0/+93
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | associated changes that had to happen to make this possible as well as bugs fixed along the way. Bring in required TLI library routines to support this. Since we don't support TLI we've essentially copied what NetBSD has done, adding a thin layer to emulate direct the TLI calls into BSD socket calls. This is mostly from Sun's tirpc release that was made in 1994, however some fixes were backported from the 1999 release (supposedly only made available after this porting effort was underway). The submitter has agreed to continue on and bring us up to the 1999 release. Several key features are introduced with this update: Client calls are thread safe. (1999 code has server side thread safe) Updated, a more modern interface. Many userland updates were done to bring the code up to par with the recent RPC API. There is an update to the pthreads library, a function pthread_main_np() was added to emulate a function of Sun's threads library. While we're at it, bring in NetBSD's lockd, it's been far too long of a wait. New rpcbind(8) replaces portmap(8) (supporting communication over an authenticated Unix-domain socket, and by default only allowing set and unset requests over that channel). It's much more secure than the old portmapper. Umount(8), mountd(8), mount_nfs(8), nfsd(8) have also been upgraded to support TI-RPC and to support IPV6. Umount(8) is also fixed to unmount pathnames longer than 80 chars, which are currently truncated by the Kernel statfs structure. Submitted by: Martin Blapp <mb@imp.ch> Manpage review: ru Secure RPC implemented by: wpaul
* libc MT-safety, part 2.deischen2001-02-111-0/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add a lock to FILE. flockfile and friends are now implemented (for the most part) in libc. flockfile_debug is implemented in libc_r; I suppose it's about time to kill it but will do it in a future commit. Fix a potential deadlock in _fwalk in a threaded environment. A file flag (__SIGN) was added to stdio.h that, when set, tells _fwalk to ignore it in its walk. This seemed to be needed in refill.c because each file needs to be locked when flushing. Add a stub for pthread_self in libc. This is needed by flockfile which is allowed by POSIX to be recursive. Make fgetpos() error return value (-1) match man page. Remove recursive calls to locked functions (stdio); I think I've got them all, but I may have missed a couple. A few K&R -> ANSI conversions along with removal of a few instances of "register". $Id$ -> $FreeBSD$ in libc/stdio/rget.c Not objected to: -arch, a few months ago
* Remove _THREAD_SAFE and make libc thread-safe by default bydeischen2001-01-241-0/+131
adding (weak definitions to) stubs for some of the pthread functions. If the threads library is linked in, the real pthread functions will pulled in. Use the following convention for system calls wrapped by the threads library: __sys_foo - actual system call _foo - weak definition to __sys_foo foo - weak definition to __sys_foo Change all libc uses of system calls wrapped by the threads library from foo to _foo. In order to define the prototypes for _foo(), we introduce namespace.h and un-namespace.h (suggested by bde). All files that need to reference these system calls, should include namespace.h before any standard includes, then include un-namespace.h after the standard includes and before any local includes. <db.h> is an exception and shouldn't be included in between namespace.h and un-namespace.h namespace.h will define foo to _foo, and un-namespace.h will undefine foo. Try to eliminate some of the recursive calls to MT-safe functions in libc/stdio in preparation for adding a mutex to FILE. We have recursive mutexes, but would like to avoid using them if possible. Remove uneeded includes of <errno.h> from a few files. Add $FreeBSD$ to a few files in order to pass commitprep. Approved by: -arch
OpenPOWER on IntegriCloud