diff options
author | Ulrich Drepper <drepper@redhat.com> | 2002-12-06 11:31:06 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2002-12-06 11:31:06 +0000 |
commit | d5ddad4ff48cc7887281259dacf5ac455d5a9dd8 (patch) | |
tree | ca4b14386bf22dcc9e9f486ac3af7c184179c590 | |
parent | fde89ad0091e492bd2d99d9d4925fbd62a7dc643 (diff) | |
download | glibc-d5ddad4ff48cc7887281259dacf5ac455d5a9dd8.zip glibc-d5ddad4ff48cc7887281259dacf5ac455d5a9dd8.tar.gz glibc-d5ddad4ff48cc7887281259dacf5ac455d5a9dd8.tar.bz2 |
(log_cleanup): New function. (openlog): Use log_cleanup instead of __libc_mutex_unlock. (closelog): Likewise.
-rw-r--r-- | misc/syslog.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/misc/syslog.c b/misc/syslog.c index 5b3bca2..c7d9297 100644 --- a/misc/syslog.c +++ b/misc/syslog.c @@ -329,14 +329,19 @@ openlog_internal(const char *ident, int logstat, int logfac) } } + +static void +log_cleanup (void *arg) +{ + __libc_lock_unlock (*(__libc_lock_t *) arg); +} + void openlog (const char *ident, int logstat, int logfac) { #ifdef _LIBC_REENTRANT /* Protect against multiple users. */ - __libc_cleanup_region_start (1, - (void (*) __P ((void *))) __libc_mutex_unlock, - &syslog_lock); + __libc_cleanup_region_start (1, log_cleanup, &syslog_lock); __libc_lock_lock (syslog_lock); #endif @@ -370,9 +375,7 @@ closelog () { #ifdef _LIBC_REENTRANT /* Protect against multiple users. */ - __libc_cleanup_region_start (1, - (void (*) __P ((void *))) __libc_mutex_unlock, - &syslog_lock); + __libc_cleanup_region_start (1, log_cleanup, &syslog_lock); __libc_lock_lock (syslog_lock); #endif |