diff options
| author | Mark Murray <markm@FreeBSD.org> | 2002-03-29 22:43:43 +0000 |
|---|---|---|
| committer | Mark Murray <markm@FreeBSD.org> | 2002-03-29 22:43:43 +0000 |
| commit | 4cd01193678a79d81b61be31c50b139d7a4c44d4 (patch) | |
| tree | 4e267e060bfb6d96f46ab0d79c49b277402c0dd0 /lib/libpthread/thread/thr_spinlock.c | |
| parent | 37c973e3dd3467124ce11509ff88977bb58a0640 (diff) | |
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_spinlock.c')
| -rw-r--r-- | lib/libpthread/thread/thr_spinlock.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lib/libpthread/thread/thr_spinlock.c b/lib/libpthread/thread/thr_spinlock.c index 696174efd931..73337094d431 100644 --- a/lib/libpthread/thread/thr_spinlock.c +++ b/lib/libpthread/thread/thr_spinlock.c @@ -33,14 +33,16 @@ * */ +#include <stdlib.h> #include <stdio.h> +#include <string.h> #include <sched.h> -#include <unistd.h> #include <pthread.h> -#include <string.h> -#include "pthread_private.h" +#include <unistd.h> + +#include <libc_private.h> -extern char *__progname; +#include "pthread_private.h" /* * Lock a location for the running thread. Yield to allow other @@ -91,7 +93,7 @@ _spinlock_debug(spinlock_t *lck, char *fname, int lineno) cnt++; if (cnt > 100) { char str[256]; - snprintf(str, sizeof(str), "%s - Warning: Thread %p attempted to lock %p from %s (%d) was left locked from %s (%d)\n", __progname, curthread, lck, fname, lineno, lck->fname, lck->lineno); + snprintf(str, sizeof(str), "%s - Warning: Thread %p attempted to lock %p from %s (%d) was left locked from %s (%d)\n", _getprogname(), curthread, lck, fname, lineno, lck->fname, lck->lineno); __sys_write(2,str,strlen(str)); __sleep(1); cnt = 0; |
