1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-28 00:21:52 +03:00
* sysdeps/unix/sysv/linux/cmsg_nxthdr.c (__cmsg_nxthdr): Correct
	test for cmsg struct size.
	* sysdeps/unix/sysv/linux/bits/socket.h (__cmsg_nxthdr): Likewise.

	* sysdeps/unix/sysv/linux/i386/makecontext.S: Remove unnecessary
	initializations.

	* libio/oldiopopen.c: Add lock for old_proc_file_chain access.
This commit is contained in:
Ulrich Drepper
2001-07-31 20:32:01 +00:00
parent 34183f57d7
commit ad71126b24
8 changed files with 66 additions and 21 deletions

View File

@ -6,9 +6,12 @@
#include <limits.h>
#include <sys/mman.h>
static pthread_mutex_t synch = PTHREAD_MUTEX_INITIALIZER;
static void *
test_thread (void *v_param)
{
pthread_mutex_lock (&synch);
return NULL;
}
@ -56,6 +59,13 @@ main (void)
return 2;
}
status = pthread_mutex_lock (&synch);
if (status != 0)
{
printf ("cannot get lock: %s\n", strerror (status));
return 1;
}
status = pthread_create (&thread, &attr, test_thread, NULL);
if (status != 0)
{
@ -85,6 +95,13 @@ main (void)
return 3;
}
status = pthread_mutex_unlock (&synch);
if (status != 0)
{
printf ("cannot release lock: %s\n", strerror (status));
return 1;
}
/* pthread_detach (thread); */
if (pthread_join (thread, NULL) != 0)
{