View | Details | Raw Unified | Return to bug 21041 | Differences between
and this patch

Collapse All | Expand All

(-)b/nptl/Makefile (-12 / +2 lines)
Lines 36-50 shared-only-routines = forward Link Here
36
36
37
# We need to provide certain routines for compatibility with existing
37
# We need to provide certain routines for compatibility with existing
38
# binaries.
38
# binaries.
39
pthread-compat-wrappers = \
39
pthread-compat-wrappers =
40
		      write read close fcntl accept \
41
		      connect recv recvfrom send \
42
		      sendto fsync lseek lseek64 \
43
		      msync nanosleep open open64 pause \
44
		      pread pread64 pwrite pwrite64 \
45
		      tcdrain wait waitpid msgrcv msgsnd \
46
		      sigwait sigsuspend \
47
		      recvmsg sendmsg
48
40
49
libpthread-routines = nptl-init vars events version pt-interp \
41
libpthread-routines = nptl-init vars events version pt-interp \
50
		      pthread_create pthread_exit pthread_detach \
42
		      pthread_create pthread_exit pthread_detach \
Lines 116-128 libpthread-routines = nptl-init vars eve Link Here
116
		      sem_wait sem_timedwait sem_post \
108
		      sem_wait sem_timedwait sem_post \
117
		      cleanup cleanup_defer cleanup_compat \
109
		      cleanup cleanup_defer cleanup_compat \
118
		      cleanup_defer_compat unwind \
110
		      cleanup_defer_compat unwind \
119
		      pt-longjmp pt-cleanup\
111
		      pt-cleanup\
120
		      cancellation \
112
		      cancellation \
121
		      lowlevellock \
113
		      lowlevellock \
122
		      lll_timedlock_wait lll_timedwait_tid \
114
		      lll_timedlock_wait lll_timedwait_tid \
123
		      pt-fork pt-vfork \
124
		      $(pthread-compat-wrappers) \
115
		      $(pthread-compat-wrappers) \
125
		      pt-raise pt-system \
126
		      flockfile ftrylockfile funlockfile \
116
		      flockfile ftrylockfile funlockfile \
127
		      sigaction \
117
		      sigaction \
128
		      herrno res pt-allocrtsig \
118
		      herrno res pt-allocrtsig \
(-)b/nptl/sem_open.c (-6 / +6 lines)
Lines 164-171 sem_open (const char *name, int oflag, . Link Here
164
  if ((oflag & O_CREAT) == 0 || (oflag & O_EXCL) == 0)
164
  if ((oflag & O_CREAT) == 0 || (oflag & O_EXCL) == 0)
165
    {
165
    {
166
    try_again:
166
    try_again:
167
      fd = __libc_open (shm_name,
167
      fd = open (shm_name,
168
			(oflag & ~(O_CREAT|O_ACCMODE)) | O_NOFOLLOW | O_RDWR);
168
		 (oflag & ~(O_CREAT|O_ACCMODE)) | O_NOFOLLOW | O_RDWR);
169
169
170
      if (fd == -1)
170
      if (fd == -1)
171
	{
171
	{
Lines 247-253 sem_open (const char *name, int oflag, . Link Here
247
	    }
247
	    }
248
248
249
	  /* Open the file.  Make sure we do not overwrite anything.  */
249
	  /* Open the file.  Make sure we do not overwrite anything.  */
250
	  fd = __libc_open (tmpfname, O_RDWR | O_CREAT | O_EXCL, mode);
250
	  fd = open (tmpfname, O_RDWR | O_CREAT | O_EXCL, mode);
251
	  if (fd == -1)
251
	  if (fd == -1)
252
	    {
252
	    {
253
	      if (errno == EEXIST)
253
	      if (errno == EEXIST)
Lines 266-272 sem_open (const char *name, int oflag, . Link Here
266
	  break;
266
	  break;
267
	}
267
	}
268
268
269
      if (TEMP_FAILURE_RETRY (__libc_write (fd, &sem.initsem, sizeof (sem_t)))
269
      if (TEMP_FAILURE_RETRY (write (fd, &sem.initsem, sizeof (sem_t)))
270
	  == sizeof (sem_t)
270
	  == sizeof (sem_t)
271
	  /* Map the sem_t structure from the file.  */
271
	  /* Map the sem_t structure from the file.  */
272
	  && (result = (sem_t *) mmap (NULL, sizeof (sem_t),
272
	  && (result = (sem_t *) mmap (NULL, sizeof (sem_t),
Lines 290-296 sem_open (const char *name, int oflag, . Link Here
290
		  (void) unlink (tmpfname);
290
		  (void) unlink (tmpfname);
291
291
292
		  /* Close the file.  */
292
		  /* Close the file.  */
293
		  (void) __libc_close (fd);
293
		  (void) close (fd);
294
294
295
		  goto try_again;
295
		  goto try_again;
296
		}
296
		}
Lines 316-322 sem_open (const char *name, int oflag, . Link Here
316
    {
316
    {
317
      /* Do not disturb errno.  */
317
      /* Do not disturb errno.  */
318
      int save = errno;
318
      int save = errno;
319
      __libc_close (fd);
319
      close (fd);
320
      errno = save;
320
      errno = save;
321
    }
321
    }
322
322
(-)b/nptl/version.c (-1 / +1 lines)
Lines 36-41 __attribute__ ((noreturn)) Link Here
36
void
36
void
37
__nptl_main (void)
37
__nptl_main (void)
38
{
38
{
39
  __libc_write (STDOUT_FILENO, banner, sizeof banner - 1);
39
  write (STDOUT_FILENO, banner, sizeof banner - 1);
40
  _exit (0);
40
  _exit (0);
41
}
41
}

Return to bug 21041