From: Ulrich Drepper Date: Wed, 10 Nov 1999 05:02:28 +0000 (+0000) Subject: Declare __pthread_last_event. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8edac5b07e0ead227156aeb33bb9bd8f2e30a0e3;p=thirdparty%2Fglibc.git Declare __pthread_last_event. Protect against multiple inclusion. Include thread_dbP.h header. (struct _pthread_descr_struct): Add new fields p_report_events and p_eventbuf. Declare event reporting functions. --- diff --git a/linuxthreads/internals.h b/linuxthreads/internals.h index 187b9b19a67..54bc36c27ef 100644 --- a/linuxthreads/internals.h +++ b/linuxthreads/internals.h @@ -12,6 +12,9 @@ /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the */ /* GNU Library General Public License for more details. */ +#ifndef _INTERNALS_H +#define _INTERNALS_H 1 + /* Internal data structures */ /* Includes */ @@ -25,6 +28,7 @@ #include "pt-machine.h" #include "semaphore.h" +#include "../linuxthreads_db/thread_dbP.h" #ifndef THREAD_GETMEM # define THREAD_GETMEM(descr, member) descr->member @@ -114,6 +118,9 @@ struct _pthread_descr_struct { size_t p_guardsize; /* size of guard area */ pthread_descr p_self; /* Pointer to this structure */ int p_nr; /* Index of descriptor in __pthread_handles */ + /* New elements must be added at the end. */ + int p_report_events; /* Nonzero if events must be reported. */ + td_eventbuf_t p_eventbuf; /* Data for event. */ } __attribute__ ((aligned(32))); /* We need to align the structure so that doubles are aligned properly. This is 8 bytes on MIPS and 16 bytes on MIPS64. @@ -217,6 +224,12 @@ extern int __pthread_exit_requested, __pthread_exit_code; extern volatile int __pthread_threads_debug; +/* Globally enabled events. */ +extern volatile td_thr_events_t __pthread_threads_events; + +/* Pointer to descriptor of thread with last event. */ +extern volatile pthread_descr __pthread_last_event; + /* Return the handle corresponding to a thread id */ static inline pthread_handle thread_handle(pthread_t id) @@ -356,9 +369,16 @@ extern void __pthread_kill_other_threads_np __P ((void)); extern int __libc_close (int fd); extern int __libc_nanosleep (const struct timespec *requested_time, struct timespec *remaining); -extern int __libc_read (int fd, void *buf, size_t count); +extern ssize_t __libc_read (int fd, void *buf, size_t count); extern pid_t __libc_waitpid (pid_t pid, int *stat_loc, int options); -extern int __libc_write (int fd, const void *buf, size_t count); +extern ssize_t __libc_write (int fd, const void *buf, size_t count); /* Prototypes for some of the new semaphore functions. */ extern int __new_sem_post (sem_t * sem); + +/* The functions called the signal events. */ +extern void __linuxthreads_create_event (void); +extern void __linuxthreads_death_event (void); +extern void __linuxthreads_reap_event (void); + +#endif /* internals.h */