Loading...
--- Libc/Libc-583/threads/mig_support.c
+++ Libc/Libc-262.3.2/threads/mig_support.c
@@ -2,6 +2,8 @@
* Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
*
* @APPLE_LICENSE_HEADER_START@
+ *
+ * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
@@ -81,11 +83,11 @@
pthread_t pself;
#ifdef CTHREADS_DEBUG
int d = cthread_debug;
-#endif /* CTHREADS_DEBUG */
+#endif CTHREADS_DEBUG
#ifdef CTHREADS_DEBUG
cthread_debug = FALSE;
-#endif /* CTHREADS_DEBUG */
+#endif CTHREADS_DEBUG
pself = pthread_self();
if ((pself != (pthread_t)NULL) && (pself->sig == _PTHREAD_SIG)) {
if (pself->reply_port == MACH_PORT_NULL) {
@@ -97,7 +99,7 @@
if (self == NO_CPROC) {
#ifdef CTHREADS_DEBUG
cthread_debug = d;
-#endif /* CTHREADS_DEBUG */
+#endif CTHREADS_DEBUG
return(_task_reply_port);
}
if (self->reply_port == MACH_PORT_NULL) {
@@ -105,7 +107,7 @@
}
#ifdef CTHREADS_DEBUG
cthread_debug = d;
-#endif /* CTHREADS_DEBUG */
+#endif CTHREADS_DEBUG
return self->reply_port;
}
@@ -122,18 +124,18 @@
register mach_port_t port;
#ifdef CTHREADS_DEBUG
int d = cthread_debug;
-#endif /* CTHREADS_DEBUG */
+#endif CTHREADS_DEBUG
#ifdef CTHREADS_DEBUG
cthread_debug = FALSE;
-#endif /* CTHREADS_DEBUG */
+#endif CTHREADS_DEBUG
pself = pthread_self();
if ((pself != (pthread_t)NULL) && (pself->sig == _PTHREAD_SIG)) {
port = pself->reply_port;
if (port != MACH_PORT_NULL && port != _task_reply_port) {
LOCK(reply_port_lock);
pself->reply_port = _task_reply_port;
- (void) mach_port_mod_refs(mach_task_self(), port, MACH_PORT_RIGHT_RECEIVE, -1);
+ (void) mach_port_destroy(mach_task_self(), port);
pself->reply_port = MACH_PORT_NULL;
UNLOCK(reply_port_lock);
}
@@ -143,7 +145,7 @@
if (self == NO_CPROC) {
#ifdef CTHREADS_DEBUG
cthread_debug = d;
-#endif /* CTHREADS_DEBUG */
+#endif CTHREADS_DEBUG
return;
}
ASSERT(self != NO_CPROC);
@@ -151,13 +153,13 @@
if (port != MACH_PORT_NULL && port != _task_reply_port) {
LOCK(reply_port_lock);
self->reply_port = _task_reply_port;
- (void) mach_port_mod_refs(mach_task_self(), port, MACH_PORT_RIGHT_RECEIVE, -1);
+ (void) mach_port_destroy(mach_task_self(), port);
self->reply_port = MACH_PORT_NULL;
UNLOCK(reply_port_lock);
}
#ifdef CTHREADS_DEBUG
cthread_debug = d;
-#endif /* CTHREADS_DEBUG */
+#endif CTHREADS_DEBUG
}
/*************************************************************