summaryrefslogtreecommitdiffstats
path: root/lib
Commit message (Collapse)AuthorAgeFilesLines
* .S comments must be C comments, not ASM ones.obrien2003-06-021-1/+1
|
* Use C99 compatible ASM statements.obrien2003-06-022-3/+3
|
* Revert accidental change: don't change the thread library for testing torwatson2003-06-021-1/+1
| | | | | | libthr. Oops, sorry about that. Submitted by: "Simon L. Nielsen" <simon@nitro.dk>
* o Fix a cut-n-paste bug. We were clobbering rp with gp...marcel2003-06-021-2/+2
| | | | | | o Make sure the arguments to ctx_wrapper() are loaded from the backing store by forcing an underflow. Do this by making all registers in the register frame local.
* A new API function PacketAliasRedirectDynamic() can be usedru2003-06-013-1/+36
| | | | | to mark a fully specified static link as dynamic; i.e. make it a one-time link.
* Include string.h for memset().rwatson2003-06-012-1/+2
|
* Make the PacketAliasSetAddress() function call optional. If itru2003-06-012-11/+18
| | | | | | is not called, and no static rules match an outgoing packet, the latter retains its source IP address. This is in support of the "static NAT only" mode.
* Match style of source and headers.jmallett2003-06-011-1/+1
| | | | Submitted by: bde
* Assorted mdoc(7) fixes.ru2003-06-015-74/+91
|
* Assorted mdoc(7) fixes.ru2003-06-016-180/+190
|
* Add GBK encodingache2003-06-013-2/+121
| | | | | PR: 51504 Submitted by: Statue <statue@freebsd.sinica.edu.tw>
* Add the part of the last commit which cvs appearantly didn't likephk2003-06-012-17/+4
| | | | the first time.
* Add openpam_readline(3).des2003-06-011-0/+2
|
* Retire pam_wheel(8) (which has been disconnected for quite a while) anddes2003-06-016-657/+0
| | | | pam_ftp(8).
* Clarify the code a bit.phk2003-06-011-1/+2
| | | | Submitted by: Nadav Eiron <nadav@TheEirons.org>
* Make prototype match code with regard to constness of args to thejmallett2003-06-011-1/+1
| | | | function pointer passed in.
* Build libthr by default on ia64.marcel2003-06-011-0/+6
|
* Don't build pam_std_option().des2003-05-311-2/+1
|
* Fix grammar bogons.schweikh2003-05-311-1/+1
| | | | MFC after: 3 days
* Rough implement of makecontext() needed to support libthr.marcel2003-05-312-1/+122
| | | | | | | | | | | | | | o Up to 8 arguments are allowed. This is the number of arguments passed in registers. Subsequent registers are passed on the stack. Trying to deal with this is not easy in C and likely forces us to use assembly code. Let's avoid that for now. There's no indication that more than 8 arguments is a strong requirement (Linux also has an 8 argument limit). o We expect that the stack base is 16-byte aligned and the stack size is a multiple of 16-byte. We bomb out if this is not the case. We probably want to be less strict by enforcing it ourselves. For now it's better to not hide gross alignment bogons by silently correcting it.
* Hook libthr to the build. It's currently built only for i386 andmtm2003-05-311-2/+5
| | | | a NOLIBTHR knob will prevent it from being built.
* Update copyright dates.des2003-05-315-5/+5
|
* Remove pam_std_option() and related functions. Add #defines for commondes2003-05-311-24/+6
| | | | options.
* Remove all instances of pam_std_option()des2003-05-315-167/+58
|
* Introduce pam_guest(8) which will replace pam_ftp(8).des2003-05-314-1/+220
|
* I botched one of my committs in the last round. Fix it.mtm2003-05-312-12/+11
|
* Fixed another bug in the threaded close() call; clear theru2003-05-311-0/+4
| | | | | | | | | stale stdio descriptors flags. PR: bin/51535 Submitted by: Enache Adrian <enache@rdslink.ro> Reviewed by: deischen Approved by: re (scottl)
* If an application closes one of its stdio descriptors (0..2),ru2003-05-311-2/+4
| | | | | | | | | | | | | | | | | an excessive close() on one of these descriptors would cause a memory for this descriptor to be allocated in the internal descriptor table. When this descriptor gets used again, e.g. through the call to open() or socket(), the descriptor would be erroneously left in the blocking mode, and the whole application would get stuck on a blocking operation, e.g., in accept(2). Prevent this bug from happening by disallowing close() against non-active descriptors (return -1 and set errno to EBADF in this case). Reviewed by: deischen Approved by: re (scottl)
* Save THR_FLAGS_IN_TDLIST in signal frame, otherwise if a thread receiveddavidxu2003-05-302-2/+4
| | | | | | | a signal will can not be removed from thread list after it exited. Reviewed by: deischen Approved by: re (jhb)
* Fix a sizeof error in __bt_put: when writing they key and data sizestmm2003-05-301-3/+5
| | | | | | | | | | to a buffer in the big key/data case, memmove() was used on pointers to size_ts, but only sizeof(u_int32_t) bytes where copied. This broke on big_endian architectures where sizeof(size_t) > sizeof(u_int32_t). This bug broke portupgrade (by way of ruby_bdb1) on sparc64. Approved by: re (rwatson)
* Add an stub for _rtld_thread_init. This is a part I missed inkan2003-05-301-0/+7
| | | | | | my last commit. Approved by: re (scottl)
* Attempt to eliminate PLT relocations from rwlock aquire/releasekan2003-05-3025-42/+822
| | | | | | | | | | | path, making them suitable for direct use by the dynamic loader. Register libpthread-specific locking API with rtld on startup. This still has some rough edges with signals which should be addresses later. Approved by: re (scottl)
* Call the __sys_sigprocmask(the system call) when sigprocmask()deischen2003-05-302-2/+8
| | | | | | | | | is called and the application is not threaded. This works around a problem when an application that hasn't yet become threaded tries to jump out of a signal handler. Reported by: mbr Approved by: re@ (rwatson)
* Don't return -1 and abort if msg.msg_controllen is 0. Formbr2003-05-291-2/+1
| | | | | | | | some strange reason recvmsg() never sets errno to EAGAIN on a non-blocking socket and just returns 0. Reviewed by: jhb Approved by: re
* Make the mutex static initializers look more like the one formtm2003-05-291-25/+19
| | | | | | | | | condition variables. Cosmetic. Explicitly compare against PTHREAD_MUTEX_INITIALIZER. We shouldn't encourage calls to the mutex functions with null pointers to mutexes. Approved by: re/jhb
* Use a static lock to ake sure pthread_cond_* functions calledmtm2003-05-291-2/+20
| | | | | | | | | | | | from multiple threads don't initialze the same condition variable more than once. Explicitly compare cond pointers with PTHREAD_COND_INITIALIZER instead of NULL. Just because it happens to be defined as NULL is no reason to encourage the idea that people can call those functions with NULL pointers to a condition variable. Approved by: re/jhb
* Missing unlock.mtm2003-05-291-0/+2
| | | | Approved by: re/jhb
* Don't hold the active thread list lock when signaling the gc thread.mtm2003-05-293-12/+21
| | | | | | | | | The dead list thread is sufficient for synchronization. Retire the arch_id (ldt array slot) in the gc thread instead of the doing it in the thread itself. Approved by: re/jhb
* It's unnecessary to lock the thread during creation. Simply extendmtm2003-05-291-5/+2
| | | | | | the scope of the active thread list lock. Approved by: re/jhb
* Fix a problem introduced in the last commit. sa and cmmbr2003-05-291-2/+2
| | | | | | | | | are not initialized at this place. Move the initializing before the non-blocking check. Submitted by: Marius Strobl <marius@alchemy.franken.de> Reviewed by: jhb Approved by: re
* Don't really spin on a spinlock; silently convert it to the samedeischen2003-05-298-32/+142
| | | | | | | | | | | | low-level lock used by the libpthread implementation. In the future, we'll eliminate spinlocks from libc but that will wait until after 5.1-release. Don't call an application signal handler if the handler is the same as the library-installed handler. This seems to be possible after a fork and is the cause of konsole hangs. Approved by: re@ (jhb)
* If AF_LOCAL is used, we need to use __msgread_withcred() instead ofmbr2003-05-281-1/+6
| | | | | | | | | just read() in non-blocking mode too. The reason is obvious. NetBSD uses a complete different way to get the credentials so this patch only applies to FreeBSD. Reviewed by: rwatson Approved by: re
* Fix amd(8) clients, if a FreeBSD mountd(8) server is used.mbr2003-05-281-9/+2
| | | | | | | | | | | | | | | | | | | | | | | | | Remove the special treatment of non-blocking mode in the "look ahead function" xdrrec_eof(). It currently assumes that the last read() in a row of several reads does not have zero lenght. If this is the case, svc_vc_stat() does return XPRT_MOREREQS, and the RPC-request aborts because there is no data to read anymore. To fix this, go back to the original version of the code for non-blocking mode until NetBSD comes up with another possible fix like this one in xdrrec_eof() if (rstrm->last_frag && rstrm->in_finger == rstrm->in_boundry) { return TRUE; } Return always FALSE in set_input_fragment() for non-blocking mode. Since this was not used in FreeBSD, I omitted it at the first time. Now we use this function and we should always return FALSE for it. Reviewed by: rwatson Approved by: re
* Fix stripping last path component when only one path component left.fjoe2003-05-281-2/+2
| | | | | PR: 52686 MFC after: 1 day
* Minimize the potential for deadlocks between an exiting thread and it'smtm2003-05-271-2/+18
| | | | | | | | joiner by making sure all locks and unlocks occur in the same order. For the record the lock order is: DEAD_LIST, THREAD_LIST, exiting thread, joiner thread. Approved by: re/rwatson
* Revert part of the last commit. I don't know what I was smoking.mtm2003-05-271-2/+13
| | | | Approved by: re/rwatson
* Decouple the thread stack [de]allocating functions from the 'dead threads list'mtm2003-05-264-7/+16
| | | | | | | lock. It's not really necessary and we don't need the added complexity or potential for deadlocks. Approved by: re/blanket libthr
* Revise the unlock order in _pthread_join(). Also, if the joinedmtm2003-05-261-12/+6
| | | | | | | | thread is not dead, the join loop is guaranteed to execute at least once, so there is no need to pick up the thread list lock after we return from suspenstion only to release it after the loop. Approved by: re/blanket libthr
* Return gracefully, rather than aborting, when the maximum concurrentmtm2003-05-256-10/+27
| | | | | | threads per process has been reached. Return EAGAIN, as per spec. Approved by: re/blanket libthr
* _pthread_cancel() breaks the normal lock order of first locking themtm2003-05-253-4/+28
| | | | | | | | | | | | | joined and then the joiner thread. There isn't an easy (sane?) way to make it use the correct order without introducing races involving the target thread and finding which (active or dead) list it is on. So, after locking the canceled thread it will try to lock the joined thread and if it fails release the first lock and try again from the top. Introduce a new function, _spintrylock, which is simply a wrapper arround umtx_trylock(), to help accomplish this. Approved by: re/blanket libthr
OpenPOWER on IntegriCloud