diff options
author | Julian Elischer <julian@FreeBSD.org> | 1997-02-05 23:26:09 +0000 |
---|---|---|
committer | Julian Elischer <julian@FreeBSD.org> | 1997-02-05 23:26:09 +0000 |
commit | c840cec7c5df4547d37d9ca025553099b834c1aa (patch) | |
tree | b2e6d3017e236268263978b585f2150cd10b1689 /lib/libpthread/thread/thr_mutex.c | |
parent | 3b576b3e5eac153732d10d222cc023a02adc3db7 (diff) | |
download | src-c840cec7c5df4547d37d9ca025553099b834c1aa.tar.gz src-c840cec7c5df4547d37d9ca025553099b834c1aa.zip |
Submitted by: John Birrell
uthreads update from the author.
Notes
Notes:
svn path=/head/; revision=22315
Diffstat (limited to 'lib/libpthread/thread/thr_mutex.c')
-rw-r--r-- | lib/libpthread/thread/thr_mutex.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/libpthread/thread/thr_mutex.c b/lib/libpthread/thread/thr_mutex.c index dc9be3c5ff78..82a26e846d5a 100644 --- a/lib/libpthread/thread/thr_mutex.c +++ b/lib/libpthread/thread/thr_mutex.c @@ -76,18 +76,18 @@ pthread_mutex_init(pthread_mutex_t * mutex, /* Process according to mutex type: */ switch (type) { - /* Fast mutex: */ + /* Fast mutex: */ case MUTEX_TYPE_FAST: /* Nothing to do here. */ break; - /* Counting mutex: */ + /* Counting mutex: */ case MUTEX_TYPE_COUNTING_FAST: /* Reset the mutex count: */ pmutex->m_data.m_count = 0; break; - /* Trap invalid mutex types: */ + /* Trap invalid mutex types: */ default: /* Return an invalid argument error: */ errno = EINVAL; @@ -130,18 +130,18 @@ pthread_mutex_destroy(pthread_mutex_t * mutex) /* Process according to mutex type: */ switch ((*mutex)->m_type) { - /* Fast mutex: */ + /* Fast mutex: */ case MUTEX_TYPE_FAST: /* Nothing to do here. */ break; - /* Counting mutex: */ + /* Counting mutex: */ case MUTEX_TYPE_COUNTING_FAST: /* Reset the mutex count: */ (*mutex)->m_data.m_count = 0; break; - /* Trap undefined mutex types: */ + /* Trap undefined mutex types: */ default: /* Return an invalid argument error: */ errno = EINVAL; @@ -348,7 +348,7 @@ pthread_mutex_unlock(pthread_mutex_t * mutex) */ else if (((*mutex)->m_owner = _thread_queue_deq(&(*mutex)->m_queue)) != NULL) { /* Allow the new owner of the mutex to run: */ - (*mutex)->m_owner->state = PS_RUNNING; + PTHREAD_NEW_STATE((*mutex)->m_owner,PS_RUNNING); } break; @@ -371,7 +371,7 @@ pthread_mutex_unlock(pthread_mutex_t * mutex) */ else if (((*mutex)->m_owner = _thread_queue_deq(&(*mutex)->m_queue)) != NULL) { /* Allow the new owner of the mutex to run: */ - (*mutex)->m_owner->state = PS_RUNNING; + PTHREAD_NEW_STATE((*mutex)->m_owner,PS_RUNNING); } break; |