PERFORCE change 74826 for review
David Xu
davidxu at FreeBSD.org
Sat Apr 9 20:37:36 PDT 2005
http://perforce.freebsd.org/chv.cgi?CH=74826
Change 74826 by davidxu at davidxu_tiger on 2005/04/10 03:36:38
Change some symbols and event control bits.
Affected files ...
.. //depot/projects/davidxu_thread/src/lib/libthr/pthread.map#8 edit
.. //depot/projects/davidxu_thread/src/lib/libthr/thread/thr_create.c#7 edit
.. //depot/projects/davidxu_thread/src/lib/libthr/thread/thr_event.c#8 edit
.. //depot/projects/davidxu_thread/src/lib/libthr/thread/thr_exit.c#5 edit
.. //depot/projects/davidxu_thread/src/lib/libthr/thread/thr_private.h#13 edit
.. //depot/projects/davidxu_thread/src/lib/libthr/thread/thr_symbols.c#7 edit
Differences ...
==== //depot/projects/davidxu_thread/src/lib/libthr/pthread.map#8 (text+ko) ====
@@ -357,7 +357,8 @@
_thread_off_key_destructor;
_thread_off_state;
_thread_off_tlsindex;
- _thread_off_enable_event;
+ _thread_off_report_events;
+ _thread_off_event_mask;
_thread_size_key;
_thread_state_running;
_thread_state_zoombie;
==== //depot/projects/davidxu_thread/src/lib/libthr/thread/thr_create.c#7 (text+ko) ====
@@ -158,7 +158,7 @@
_thr_link(curthread, new_thread);
/* Return thread pointer eariler so that new thread can use it. */
(*thread) = new_thread;
- if (_libthr_debug) {
+ if (1) {// curthread->report_events) {
THR_THREAD_LOCK(curthread, new_thread);
locked = 1;
} else
==== //depot/projects/davidxu_thread/src/lib/libthr/thread/thr_event.c#8 (text+ko) ====
@@ -54,11 +54,7 @@
_thr_report_event(struct pthread *curthread, struct pthread *thread,
int event, void *data)
{
- if (!_libthr_debug ||
-#if 0
- (curthread->enable_event == 0 && event != TD_CREATE) ||
-#endif
- !(_thread_event_mask & event))
+ if (!(event & (curthread->event_mask | _thread_event_mask)))
return;
THR_UMTX_LOCK(curthread, &_thr_event_lock);
_thread_event.event = event;
==== //depot/projects/davidxu_thread/src/lib/libthr/thread/thr_exit.c#5 (text+ko) ====
@@ -130,7 +130,7 @@
THREAD_LIST_UNLOCK(curthread);
if (curthread->joiner)
_thr_umtx_wake(&curthread->state, INT_MAX);
- if (__predict_false(_libthr_debug))
+ if (__predict_false(curthread->report_events))
_thr_report_death(curthread);
thr_exit(&curthread->tid);
PANIC("thr_exit() returned");
==== //depot/projects/davidxu_thread/src/lib/libthr/thread/thr_private.h#13 (text+ko) ====
@@ -490,8 +490,9 @@
/* Cleanup handlers Link List */
struct pthread_cleanup *cleanup;
- /* Event reporting mask */
- int enable_event;
+ /* Event reporting masks */
+ int report_events;
+ int event_mask;
};
#define THR_UMTX_TRYLOCK(thrd, lck) \
==== //depot/projects/davidxu_thread/src/lib/libthr/thread/thr_symbols.c#7 (text+ko) ====
@@ -47,7 +47,8 @@
int _thread_off_attr_flags = offsetof(struct pthread, attr.flags);
int _thread_off_linkmap = offsetof(Obj_Entry, linkmap);
int _thread_off_tlsindex = offsetof(Obj_Entry, tlsindex);
-int _thread_off_enable_event = offsetof(struct pthread, enable_event);
+int _thread_off_report_events = offsetof(struct pthread, report_events);
+int _thread_off_event_mask = offsetof(struct pthread, event_mask);
int _thread_size_key = sizeof(struct pthread_key);
int _thread_off_key_allocated = offsetof(struct pthread_key, allocated);
int _thread_off_key_destructor = offsetof(struct pthread_key, destructor);
More information about the p4-projects
mailing list