Commit Graph

11 Commits

Author SHA1 Message Date
Mike Makonnen
dbc6f4c07d Sweep through pthread locking and use the new locking primitives for
libthr.
2003-06-29 23:51:04 +00:00
Mike Makonnen
4384412030 Consolidate static_init() and static_init_private into one function.
The behaviour of this function is controlled by the argument: private.
2003-06-02 10:04:18 +00:00
Mike Makonnen
6e1aa51e9e I botched one of my committs in the last round. Fix it. 2003-05-31 14:38:22 +00:00
Mike Makonnen
1b2a19ce0e Make the mutex static initializers look more like the one for
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
2003-05-29 20:58:31 +00:00
Mike Makonnen
7d9d7ca2ed Make WARNS2 clean. The fixes mostly included:
o removed unused variables
	o explicit inclusion of header files
	o prototypes for externally defined functions

Approved by:    re/blanket libthr
2003-05-23 09:48:20 +00:00
Mike Makonnen
6439d4c286 Insert a debugging aid:
When in either the mutex or cond queue we notice that the thread
 is already on one of the queues, don't just simply abort(). Print
 out the thread's identifiers and what queue it was on.

Approved by: markm/mentor, re/blanket libthr
2003-05-21 03:41:07 +00:00
Mike Makonnen
c984b5a72a msg1 2003-05-12 10:34:01 +00:00
Mike Makonnen
ae0df91f34 o Correct a debug message that refered to the wrong function
o Remove an unncecesary if clause

Approved by:	markm (mentor)(implicit)
Reviewd by:	jeff
2003-05-06 02:30:52 +00:00
Jeff Roberson
26f52e2f8b - Define curthread as _get_curthread() and remove all direct calls to
_get_curthread().  This is similar to the kernel's curthread.  Doing
   this saves stack overhead and is more convenient to the programmer.
 - Pass the pointer to the newly created thread to _thread_init().
 - Remove _get_curthread_slow().
2003-04-02 03:05:39 +00:00
Jeff Roberson
360a519459 - Restore old mutex code from libc_r. It is more standards compliant.
This was changed because originally we were blocking on the umtx and
   allowing the kernel to do the queueing.  It was decided that the
   lib should queue and start the threads in the order it decides and the
   umtx code would just be used like spinlocks.
2003-04-01 22:39:31 +00:00
Jeff Roberson
bb535300dd - Add libthr but don't hook it up to the regular build yet. This is an
adaptation of libc_r for the thr system call interface.  This is beta
   quality code.
2003-04-01 03:46:29 +00:00