mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-28 00:21:52 +03:00
Update.
2001-12-29 Andreas Jaeger <aj@suse.de> * Examples/ex9.c: Add noreturn attribute for thread. * Examples/ex10.c: Likewise. * Examples/ex13.c (thread_start): Likewise. * Examples/ex15.c (worker): Likewise. * Examples/ex18.c: Include unistd.h for prototype of sleep.
This commit is contained in:
@ -1,3 +1,12 @@
|
|||||||
|
2001-12-29 Andreas Jaeger <aj@suse.de>
|
||||||
|
|
||||||
|
* Examples/ex9.c: Add noreturn attribute for thread.
|
||||||
|
* Examples/ex10.c: Likewise.
|
||||||
|
* Examples/ex13.c (thread_start): Likewise.
|
||||||
|
* Examples/ex15.c (worker): Likewise.
|
||||||
|
|
||||||
|
* Examples/ex18.c: Include unistd.h for prototype of sleep.
|
||||||
|
|
||||||
2001-12-14 Ulrich Drepper <drepper@redhat.com>
|
2001-12-14 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
* man/pthread_atfork.man: Adjust description of mutex handling
|
* man/pthread_atfork.man: Adjust description of mutex handling
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Tests for pthread_mutex_timedlock function.
|
/* Tests for pthread_mutex_timedlock function.
|
||||||
Copyright (C) 2000 Free Software Foundation, Inc.
|
Copyright (C) 2000, 2001 Free Software Foundation, Inc.
|
||||||
Contributed by Kaz Kylheku <kaz@ashi.footprints.net>, 2000.
|
Contributed by Kaz Kylheku <kaz@ashi.footprints.net>, 2000.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -28,7 +28,7 @@
|
|||||||
#define NUM_ITERS 50
|
#define NUM_ITERS 50
|
||||||
#define TIMEOUT_NS 100000000L
|
#define TIMEOUT_NS 100000000L
|
||||||
|
|
||||||
static void *thread (void *);
|
static void *thread (void *) __attribute__ ((__noreturn__));
|
||||||
static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Test for Pthreads/mutexes.
|
/* Test for Pthreads/mutexes.
|
||||||
Copyright (C) 2000 Free Software Foundation, Inc.
|
Copyright (C) 2000, 2001 Free Software Foundation, Inc.
|
||||||
This file is part of the GNU C Library.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Kurt Garloff <garloff@suse.de>, 2000.
|
Contributed by Kurt Garloff <garloff@suse.de>, 2000.
|
||||||
|
|
||||||
@ -25,6 +25,9 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
static void *thread_start (void *ptr) __attribute__ ((__noreturn__));
|
||||||
|
|
||||||
|
|
||||||
struct thr_ctrl
|
struct thr_ctrl
|
||||||
{
|
{
|
||||||
pthread_mutex_t mutex;
|
pthread_mutex_t mutex;
|
||||||
@ -58,7 +61,6 @@ pthr_cond_signal_mutex (pthread_cond_t * cond, pthread_mutex_t * mut)
|
|||||||
printf ("mutex_unlock: %s\n", strerror (err));
|
printf ("mutex_unlock: %s\n", strerror (err));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void *
|
static void *
|
||||||
thread_start (void *ptr)
|
thread_start (void *ptr)
|
||||||
{
|
{
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
|
static void *worker (void *dummy) __attribute__ ((__noreturn__));
|
||||||
|
|
||||||
static void *
|
static void *
|
||||||
worker (void *dummy)
|
worker (void *dummy)
|
||||||
{
|
{
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* Tests for pthread_barrier_* functions.
|
/* Tests for pthread_barrier_* functions.
|
||||||
Copyright (C) 2000 Free Software Foundation, Inc.
|
Copyright (C) 2000, 2001 Free Software Foundation, Inc.
|
||||||
Contributed by Kaz Kylheku <kaz@ashi.footprints.net>, 2000.
|
Contributed by Kaz Kylheku <kaz@ashi.footprints.net>, 2000.
|
||||||
|
|
||||||
The GNU C Library is free software; you can redistribute it and/or
|
The GNU C Library is free software; you can redistribute it and/or
|
||||||
@ -26,7 +26,7 @@
|
|||||||
#define NUM_THREADS 10
|
#define NUM_THREADS 10
|
||||||
#define NUM_ITERS 500
|
#define NUM_ITERS 500
|
||||||
|
|
||||||
static void *thread (void *);
|
static void *thread (void *) __attribute__ ((__noreturn__));
|
||||||
static pthread_barrier_t barrier;
|
static pthread_barrier_t barrier;
|
||||||
|
|
||||||
int
|
int
|
||||||
|
Reference in New Issue
Block a user