about summary refs log tree commit diff
path: root/nptl/sem_open.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-12-08 03:13:06 +0000
committerUlrich Drepper <drepper@redhat.com>2002-12-08 03:13:06 +0000
commit09efc3ba1269f79b78ee0724501fc762c2d5ab49 (patch)
tree840ca5c526b221f3510f23b1f17c9e379b84129f /nptl/sem_open.c
parent6ccb3834ebf1cb65d180144442a68cd1c24f1dd5 (diff)
downloadglibc-09efc3ba1269f79b78ee0724501fc762c2d5ab49.tar.gz
glibc-09efc3ba1269f79b78ee0724501fc762c2d5ab49.tar.xz
glibc-09efc3ba1269f79b78ee0724501fc762c2d5ab49.zip
Update.
2002-12-07  Ulrich Drepper  <drepper@redhat.com>

	* sysdeps/generic/bits/stdio-lock.h (_IO_lock_trylock): New define.
Diffstat (limited to 'nptl/sem_open.c')
-rw-r--r--nptl/sem_open.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/nptl/sem_open.c b/nptl/sem_open.c
index 6fc72f7dc6..e8ef8f5f77 100644
--- a/nptl/sem_open.c
+++ b/nptl/sem_open.c
@@ -131,7 +131,7 @@ sem_open (const char *name, int oflag, ...)
   int fd;
 
   /* Determine where the shmfs is mounted.  */
-  pthread_once (&__namedsem_once, __where_is_shmfs);
+  INTUSE(__pthread_once) (&__namedsem_once, __where_is_shmfs);
 
   /* If we don't know the mount points there is nothing we can do.  Ever.  */
   if (mountpoint.dir == NULL)
@@ -160,7 +160,7 @@ sem_open (const char *name, int oflag, ...)
   /* If the semaphore object has to exist simply open it.  */
   if ((oflag & O_CREAT) == 0)
     {
-      fd = open (finalname, oflag | O_NOFOLLOW);
+      fd = __libc_open (finalname, oflag | O_NOFOLLOW);
 
       if (fd == -1)
 	/* Return.  errno is already set.  */
@@ -210,7 +210,7 @@ sem_open (const char *name, int oflag, ...)
       memset ((char *) &initsem + sizeof (struct sem), '\0',
 	      sizeof (sem_t) - sizeof (struct sem));
 
-      if (TEMP_FAILURE_RETRY (write (fd, &initsem, sizeof (sem_t)))
+      if (TEMP_FAILURE_RETRY (__libc_write (fd, &initsem, sizeof (sem_t)))
 	  != sizeof (sem_t)
 	  /* Adjust the permission.  */
 	  || fchmod (fd, mode) != 0)
@@ -252,7 +252,7 @@ sem_open (const char *name, int oflag, ...)
     }
 
   /* We don't need the file descriptor anymore.  */
-  close (fd);
+  __libc_close (fd);
 
   return result;
 }