Diff
Not logged in

Differences From Artifact [7b51738f2d]:

To Artifact [50a6801b9b]:


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
 * tclUnixNotify.c --
 *
 *	This file contains the implementation of the select()-based
 *	Unix-specific notifier, which is the lowest-level part of the Tcl
 *	event loop. This file works together with generic/tclNotify.c.
 *
 * Copyright (c) 1995-1997 Sun Microsystems, Inc.
 *
 * See the file "license.terms" for information on usage and redistribution of
 * this file, and for a DISCLAIMER OF ALL WARRANTIES.
 *
 * RCS: @(#) $Id: tclUnixNotfy.c,v 1.12.2.23 2009/12/17 15:17:58 dgp Exp $
 */

#include "tclInt.h"
#ifndef HAVE_COREFOUNDATION	/* Darwin/Mac OS X CoreFoundation notifier is
				 * in tclMacOSXNotify.c */
#include <signal.h>










|
|

|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
 * tclUnixNotify.c --
 *
 *	This file contains the implementation of the select()-based
 *	Unix-specific notifier, which is the lowest-level part of the Tcl
 *	event loop. This file works together with generic/tclNotify.c.
 *
 * Copyright (c) 1995-1997 Sun Microsystems, Inc.
 *
 * See the file "license.terms" for information on usage and redistribution
 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
 *
 * RCS: @(#) $Id: tclUnixNotfy.c,v 1.12.2.24 2010/06/21 20:23:42 dgp Exp $
 */

#include "tclInt.h"
#ifndef HAVE_COREFOUNDATION	/* Darwin/Mac OS X CoreFoundation notifier is
				 * in tclMacOSXNotify.c */
#include <signal.h>

228
229
230
231
232
233
234
235
236
237
238
239
240
241
242

	while (triggerPipe < 0) {
	    Tcl_ConditionWait(&notifierCV, &notifierMutex, NULL);
	}

	Tcl_MutexUnlock(&notifierMutex);
#endif
	return (ClientData) tsdPtr;
    }
}

/*
 *----------------------------------------------------------------------
 *
 * Tcl_FinalizeNotifier --







|







228
229
230
231
232
233
234
235
236
237
238
239
240
241
242

	while (triggerPipe < 0) {
	    Tcl_ConditionWait(&notifierCV, &notifierMutex, NULL);
	}

	Tcl_MutexUnlock(&notifierMutex);
#endif
	return tsdPtr;
    }
}

/*
 *----------------------------------------------------------------------
 *
 * Tcl_FinalizeNotifier --
340
341
342
343
344
345
346
347

348
349
350
351
352
353
354
    ClientData clientData)
{
    if (tclNotifierHooks.alertNotifierProc) {
	tclNotifierHooks.alertNotifierProc(clientData);
	return;
    } else {
#ifdef TCL_THREADS
	ThreadSpecificData *tsdPtr = (ThreadSpecificData *) clientData;

	Tcl_MutexLock(&notifierMutex);
	tsdPtr->eventReady = 1;
	Tcl_ConditionNotify(&tsdPtr->waitCV);
	Tcl_MutexUnlock(&notifierMutex);
#endif
    }
}







|
>







340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
    ClientData clientData)
{
    if (tclNotifierHooks.alertNotifierProc) {
	tclNotifierHooks.alertNotifierProc(clientData);
	return;
    } else {
#ifdef TCL_THREADS
	ThreadSpecificData *tsdPtr = clientData;

	Tcl_MutexLock(&notifierMutex);
	tsdPtr->eventReady = 1;
	Tcl_ConditionNotify(&tsdPtr->waitCV);
	Tcl_MutexUnlock(&notifierMutex);
#endif
    }
}