diff options
Diffstat (limited to 'lib/libkse')
-rw-r--r-- | lib/libkse/thread/thr_exit.c | 13 | ||||
-rw-r--r-- | lib/libkse/thread/thr_private.h | 3 | ||||
-rw-r--r-- | lib/libkse/thread/thr_sig.c | 5 |
3 files changed, 4 insertions, 17 deletions
diff --git a/lib/libkse/thread/thr_exit.c b/lib/libkse/thread/thr_exit.c index 169aa4f..fd0e84a 100644 --- a/lib/libkse/thread/thr_exit.c +++ b/lib/libkse/thread/thr_exit.c @@ -87,13 +87,9 @@ _thread_exit(char *fname, int lineno, char *string) char s[256]; /* Prepare an error message string: */ - strcpy(s, "Fatal error '"); - strcat(s, string); - strcat(s, "' at line ? "); - strcat(s, "in file "); - strcat(s, fname); - strcat(s, " (errno = ?"); - strcat(s, ")\n"); + snprintf(s, sizeof(s), + "Fatal error '%s' at line %d in file %s (errno = %d)\n", + string, lineno, fname, errno); /* Write the string to the standard error file descriptor: */ __sys_write(2, s, strlen(s)); @@ -127,9 +123,6 @@ _thread_exit_cleanup(void) /* Unlock all owned fd locks: */ _thread_fd_unlock_owned(curthread); - /* Unlock all owned file locks: */ - _funlock_owned(curthread); - /* Unlock all private mutexes: */ _mutex_unlock_private(curthread); diff --git a/lib/libkse/thread/thr_private.h b/lib/libkse/thread/thr_private.h index 78b75ef..7a37de8 100644 --- a/lib/libkse/thread/thr_private.h +++ b/lib/libkse/thread/thr_private.h @@ -1208,8 +1208,6 @@ void _cond_wait_backout(pthread_t); void _fd_lock_backout(pthread_t); int _find_dead_thread(pthread_t); int _find_thread(pthread_t); -void _flockfile_backout(pthread_t); -void _funlock_owned(pthread_t); struct pthread *_get_curthread(void); void _set_curthread(struct pthread *); void _join_backout(pthread_t); @@ -1241,6 +1239,7 @@ int _pthread_mutexattr_init(pthread_mutexattr_t *); int _pthread_mutexattr_destroy(pthread_mutexattr_t *); int _pthread_mutexattr_settype(pthread_mutexattr_t *, int); int _pthread_once(pthread_once_t *, void (*) (void)); +pthread_t _pthread_self(void); int _pthread_setspecific(pthread_key_t, const void *); void _waitq_insert(pthread_t pthread); void _waitq_remove(pthread_t pthread); diff --git a/lib/libkse/thread/thr_sig.c b/lib/libkse/thread/thr_sig.c index 9559bb7..a005adf 100644 --- a/lib/libkse/thread/thr_sig.c +++ b/lib/libkse/thread/thr_sig.c @@ -941,11 +941,6 @@ _thread_sig_wrapper(void) psf->saved_state.psd_state = PS_RUNNING; break; - case PS_FILE_WAIT: - _flockfile_backout(thread); - psf->saved_state.psd_state = PS_RUNNING; - break; - case PS_COND_WAIT: _cond_wait_backout(thread); psf->saved_state.psd_state = PS_RUNNING; |