thread->md.asyncNotifyPending = PR_TRUE;
static pascal void  RawEndpointNotifierRoutine(void * contextPtr, OTEventCode code, OTResult result, void * cookie){	RawEndpointAndThread *endthr = (RawEndpointAndThread *) contextPtr;    PRThread *    thread   = endthr->thread;    EndpointRef * endpoint = endthr->endpoint;    _PRCPU *      cpu      = _PR_MD_CURRENT_CPU(); 	OSStatus      err;	OTResult	  resultOT;    switch (code)    {// OTLook Events -         case T_LISTEN:        // A connection request is available            PR_ASSERT(!"T_EXDATA not implemented for raw endpoints");            break;			        case T_CONNECT:      // Confirmation of a connect request			// cookie = sndCall parameter from OTConnect()            err = OTRcvConnect(endpoint, NULL);            PR_ASSERT(err == kOTNoError);			// wake up waiting thread            break;        case T_DATA:        // Standard data is available			break;        case T_EXDATA:      // Expedited data is available            PR_ASSERT(!"T_EXDATA Not implemented for raw endpoints");			return;        case T_DISCONNECT:  // A disconnect is available            err = OTRcvDisconnect(endpoint, NULL);            PR_ASSERT(err == kOTNoError);            break;		        case T_ERROR:       // obsolete/unused in library            PR_ASSERT(!"T_ERROR Not implemented for raw endpoints");			return;				        case T_UDERR:       // UDP Send error; clear the error			(void) OTRcvUDErr((EndpointRef) cookie, NULL);            break;        case T_ORDREL:      // An orderly release is available            err = OTRcvOrderlyDisconnect(endpoint);            PR_ASSERT(err == kOTNoError);            break;		        case T_GODATA:   // Flow control lifted on standard data			resultOT = OTLook(endpoint);		// clear T_GODATA event			PR_ASSERT(resultOT == T_GODATA);						// wake up waiting thread, if any            break;        case T_GOEXDATA: // Flow control lifted on expedited data            PR_ASSERT(!"T_GOEXDATA Not implemented");			return;        case T_REQUEST:  // An Incoming request is available            PR_ASSERT(!"T_REQUEST Not implemented");            return;        case T_REPLY:    // An Incoming reply is available            PR_ASSERT(!"T_REPLY Not implemented");            return;        case T_PASSCON:  // State is now T_DATAXFER			// OTAccept() complete, receiving endpoint in T_DATAXFER state			// cookie = OTAccept() resRef parameter			break;            // Async Completion Events        case T_BINDCOMPLETE:        case T_UNBINDCOMPLETE:        case T_ACCEPTCOMPLETE:        case T_OPTMGMTCOMPLETE:        case T_GETPROTADDRCOMPLETE:            break;		// for other OT events, see NotifierRoutine above        default:            return;    }	if (thread) {		thread->md.osErrCode = result;		if (_PR_MD_GET_INTSOFF()) {			cpu->u.missed[cpu->where] |= _PR_MISSED_IO;			thread->md.asyncNotifyPending = PR_TRUE;			return;		}		DoneWaitingOnThisThread(thread);	}}