Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update.
2004-12-01  Jakub Jelinek  <jakub@redhat.com>

	* posix/tst-regex.c: Use defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0
	conditionals instead of defined _POSIX_CPUTIME.
	(main): If _POSIX_CPUTIME == 0, call sysconf to see if CPUTIME
	option is available.
	* posix/tst-regex.c2: Use defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0
	conditionals instead of defined _POSIX_CPUTIME.
	(do_test): If _POSIX_CPUTIME == 0, call sysconf to see if CPUTIME
	option is available.
	* sysdeps/posix/sysconf.c (__sysconf): If _POSIX_CPUTIME resp.
	_POSIX_THREAD_CPUTIME is defined to 0, return -1 for the corresponding
	_SC_ argument.
  • Loading branch information
Ulrich Drepper committed Dec 10, 2004
1 parent 708bfb9 commit bf7c04c
Show file tree
Hide file tree
Showing 20 changed files with 89 additions and 1,185 deletions.
14 changes: 14 additions & 0 deletions ChangeLog
@@ -1,3 +1,17 @@
2004-12-01 Jakub Jelinek <jakub@redhat.com>

* posix/tst-regex.c: Use defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0
conditionals instead of defined _POSIX_CPUTIME.
(main): If _POSIX_CPUTIME == 0, call sysconf to see if CPUTIME
option is available.
* posix/tst-regex.c2: Use defined _POSIX_CPUTIME && _POSIX_CPUTIME >= 0
conditionals instead of defined _POSIX_CPUTIME.
(do_test): If _POSIX_CPUTIME == 0, call sysconf to see if CPUTIME
option is available.
* sysdeps/posix/sysconf.c (__sysconf): If _POSIX_CPUTIME resp.
_POSIX_THREAD_CPUTIME is defined to 0, return -1 for the corresponding
_SC_ argument.

2004-12-08 Jakub Jelinek <jakub@redhat.com>

* elf/ldd.bash.in: When set -o pipefail is available, use that for
Expand Down
8 changes: 1 addition & 7 deletions linuxthreads/sysdeps/pthread/posix-timer.h
@@ -1,5 +1,5 @@
/* Definitions for POSIX timer implementation on top of LinuxThreads.
Copyright (C) 2000, 2002 Free Software Foundation, Inc.
Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Kaz Kylheku <kaz@ashi.footprints.net>.
Expand Down Expand Up @@ -85,12 +85,6 @@ extern int __timer_init_failed;
/* A distinct thread is used for each clock type. */

extern struct thread_node __timer_signal_thread_rclk;
#ifdef _POSIX_CPUTIME
extern struct thread_node __timer_signal_thread_pclk;
#endif
#ifdef _POSIX_THREAD_CPUTIME
extern struct thread_node __timer_signal_thread_tclk;
#endif


/* Return pointer to timer structure corresponding to ID. */
Expand Down
19 changes: 1 addition & 18 deletions linuxthreads/sysdeps/pthread/timer_create.c
Expand Up @@ -94,24 +94,7 @@ timer_create (clock_id, evp, timerid)
case SIGEV_SIGNAL:
/* We have a global thread for delivering timed signals.
If it is not running, try to start it up. */
switch (clock_id)
{
case CLOCK_REALTIME:
default:
thread = &__timer_signal_thread_rclk;
break;
#ifdef _POSIX_CPUTIME
case CLOCK_PROCESS_CPUTIME_ID:
thread = &__timer_signal_thread_pclk;
break;
#endif
#ifdef _POSIX_THREAD_CPUTIME
case CLOCK_THREAD_CPUTIME_ID:
thread = &__timer_signal_thread_tclk;
break;
#endif
}

thread = &__timer_signal_thread_rclk;
if (! thread->exists)
{
if (__builtin_expect (__timer_thread_start (thread),
Expand Down
18 changes: 0 additions & 18 deletions linuxthreads/sysdeps/pthread/timer_routines.c
Expand Up @@ -52,12 +52,6 @@ int __timer_init_failed;

/* Node for the thread used to deliver signals. */
struct thread_node __timer_signal_thread_rclk;
#ifdef _POSIX_CPUTIME
struct thread_node __timer_signal_thread_pclk;
#endif
#ifdef _POSIX_THREAD_CPUTIME
struct thread_node __timer_signal_thread_tclk;
#endif

/* Lists to keep free and used timers and threads. */
struct list_links timer_free_list;
Expand Down Expand Up @@ -190,12 +184,6 @@ init_module (void)
list_append (&thread_free_list, &thread_array[i].links);

thread_init (&__timer_signal_thread_rclk, 0, CLOCK_REALTIME);
#ifdef _POSIX_CPUTIME
thread_init (&__timer_signal_thread_pclk, 0, CLOCK_PROCESS_CPUTIME_ID);
#endif
#ifdef _POSIX_THREAD_CPUTIME
thread_init (&__timer_signal_thread_tclk, 0, CLOCK_THREAD_CPUTIME_ID);
#endif
}


Expand Down Expand Up @@ -280,12 +268,6 @@ thread_cleanup (void *val)

/* How did the signal thread get killed? */
assert (thread != &__timer_signal_thread_rclk);
#ifdef _POSIX_CPUTIME
assert (thread != &__timer_signal_thread_pclk);
#endif
#ifdef _POSIX_THREAD_CPUTIME
assert (thread != &__timer_signal_thread_tclk);
#endif

pthread_mutex_lock (&__timer_mutex);

Expand Down
6 changes: 6 additions & 0 deletions linuxthreads/sysdeps/unix/sysv/linux/bits/posix_opt.h
Expand Up @@ -107,6 +107,12 @@
/* POSIX shared memory objects are implemented. */
#define _POSIX_SHARED_MEMORY_OBJECTS 200112L

/* CPU-time clocks support needs to be checked at runtime. */
#define _POSIX_CPUTIME 0

/* Clock support in threads must be also checked at runtime. */
#define _POSIX_THREAD_CPUTIME 0

/* GNU libc provides regular expression handling. */
#define _POSIX_REGEXP 1

Expand Down
181 changes: 0 additions & 181 deletions linuxthreads/sysdeps/unix/sysv/linux/i386/bits/posix_opt.h

This file was deleted.

0 comments on commit bf7c04c

Please sign in to comment.