PERFORCE change 36048 for review
Chris Vance
cvance at FreeBSD.org
Wed Aug 13 17:51:27 GMT 2003
http://perforce.freebsd.org/chv.cgi?CH=36048
Change 36048 by cvance at cvance_osx_laptop on 2003/08/13 10:50:57
wait_queue_t is a pointer, not a structure, so make sure it gets
allocated before initialization. The Mach wait_queue_alloc() function
does both.
Affected files ...
.. //depot/projects/trustedbsd/sedarwin/apsl/xnu/bsd/kern/kern_condvar.c#4 edit
Differences ...
==== //depot/projects/trustedbsd/sedarwin/apsl/xnu/bsd/kern/kern_condvar.c#4 (text+ko) ====
@@ -44,9 +44,9 @@
{
bzero(cvp, sizeof(*cvp));
- if (wait_queue_init(cvp->cv_wait_queue, SYNC_POLICY_FIFO) !=
- KERN_SUCCESS)
- panic("cv_init: wait_queue_init failed");
+ cvp->cv_wait_queue = wait_queue_alloc(SYNC_POLICY_FIFO);
+ if (cvp->cv_wait_queue == WAIT_QUEUE_NULL)
+ panic("cv_init: wait_queue_alloc failed");
}
void
@@ -61,6 +61,7 @@
if (!wait_queue_is_queue(cvp->cv_wait_queue))
panic("cv_destroy: !wait_queue_is_queue");
#endif
+ wait_queue_free(cvp->cv_wait_queue);
bzero(cvp, sizeof(*cvp));
}
To Unsubscribe: send mail to majordomo at trustedbsd.org
with "unsubscribe trustedbsd-cvs" in the body of the message
More information about the trustedbsd-cvs
mailing list