mirror of
https://sourceware.org/git/glibc.git
synced 2025-07-30 22:43:12 +03:00
Update.
2003-04-10 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks in child.
This commit is contained in:
@ -1,3 +1,8 @@
|
|||||||
|
2003-04-10 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
|
* sysdeps/unix/sysv/linux/fork.c (__libc_fork): Reset CPU clocks
|
||||||
|
in child.
|
||||||
|
|
||||||
2003-04-09 Ulrich Drepper <drepper@redhat.com>
|
2003-04-09 Ulrich Drepper <drepper@redhat.com>
|
||||||
|
|
||||||
* Makefile (tests): Add tst-detach1.
|
* Makefile (tests): Add tst-detach1.
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
||||||
02111-1307 USA. */
|
02111-1307 USA. */
|
||||||
|
|
||||||
|
#include <assert.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
@ -24,8 +25,9 @@
|
|||||||
#include <libio/libioP.h>
|
#include <libio/libioP.h>
|
||||||
#include <tls.h>
|
#include <tls.h>
|
||||||
#include "fork.h"
|
#include "fork.h"
|
||||||
|
#include <hp-timing.h>
|
||||||
|
#include <ldsodefs.h>
|
||||||
#include <bits/stdio-lock.h>
|
#include <bits/stdio-lock.h>
|
||||||
#include <assert.h>
|
|
||||||
|
|
||||||
|
|
||||||
unsigned long int *__fork_generation_pointer;
|
unsigned long int *__fork_generation_pointer;
|
||||||
@ -83,11 +85,21 @@ __libc_fork (void)
|
|||||||
|
|
||||||
if (pid == 0)
|
if (pid == 0)
|
||||||
{
|
{
|
||||||
assert (THREAD_GETMEM (THREAD_SELF, tid) != ppid);
|
struct pthread *self = THREAD_SELF;
|
||||||
|
|
||||||
|
assert (THREAD_GETMEM (self, tid) != ppid);
|
||||||
|
|
||||||
if (__fork_generation_pointer != NULL)
|
if (__fork_generation_pointer != NULL)
|
||||||
*__fork_generation_pointer += 4;
|
*__fork_generation_pointer += 4;
|
||||||
|
|
||||||
|
#if HP_TIMING_AVAIL
|
||||||
|
/* The CPU clock of the thread and process have to be set to zero. */
|
||||||
|
hp_timing_t now;
|
||||||
|
HP_TIMING_NOW (now);
|
||||||
|
THREAD_SETMEM (self, cpuclock_offset, now);
|
||||||
|
GL(dl_cpuclock_offset) = now;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Reset the file list. These are recursive mutexes. */
|
/* Reset the file list. These are recursive mutexes. */
|
||||||
fresetlockfiles ();
|
fresetlockfiles ();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user