PERFORCE change 74659 for review
David Xu
davidxu at FreeBSD.org
Thu Apr 7 04:24:35 PDT 2005
http://perforce.freebsd.org/chv.cgi?CH=74659
Change 74659 by davidxu at davidxu_alona on 2005/04/07 11:23:45
1. TD_CREATE event should only be masked by global event mask.
2. Allow _thr_report_event to accept data pointer.
Affected files ...
.. //depot/projects/davidxu_thread/src/lib/libthr/thread/thr_event.c#4 edit
.. //depot/projects/davidxu_thread/src/lib/libthr/thread/thr_private.h#10 edit
Differences ...
==== //depot/projects/davidxu_thread/src/lib/libthr/thread/thr_event.c#4 (text+ko) ====
@@ -47,25 +47,25 @@
void _thr_report_create(struct pthread *curthread)
{
- _thr_report_event(curthread, TD_CREATE);
+ _thr_report_event(curthread, TD_CREATE, 0);
}
void _thr_report_death(struct pthread *curthread)
{
- _thr_report_event(curthread, TD_DEATH);
+ _thr_report_event(curthread, TD_DEATH, 0);
}
void
-_thr_report_event(struct pthread *curthread, int event)
+_thr_report_event(struct pthread *curthread, int event, void *data)
{
if (!_libthr_debug ||
- !(curthread->enable_event) ||
+ (curthread->enable_event == 0 && event != TD_CREATE) ||
!(_thread_event_mask & event))
return;
THR_UMTX_LOCK(curthread, &_thr_event_lock);
_thread_event.event = event;
_thread_event.thread = curthread;
- _thread_event.data = 0;
+ _thread_event.data = data;
switch (event) {
case TD_CREATE:
_thread_create_bp();
==== //depot/projects/davidxu_thread/src/lib/libthr/thread/thr_private.h#10 (text+ko) ====
@@ -740,7 +740,7 @@
void _thr_assert_lock_level() __dead2;
void _thr_report_create(struct pthread *curthread);
void _thr_report_death(struct pthread *curthread);
-void _thr_report_event(struct pthread *curthread, int event);
+void _thr_report_event(struct pthread *curthread, int event, void *data);
int _thread_create_bp(void);
int _thread_death_bp(void);
More information about the p4-projects
mailing list