1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
-
+
|
/*
* 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.6 1999/10/21 02:18:09 hobbs Exp $
* RCS: @(#) $Id: tclUnixNotfy.c,v 1.7 2000/01/21 02:26:25 hobbs Exp $
*/
#include "tclInt.h"
#include "tclPort.h"
#include <signal.h>
extern TclStubs tclStubs;
|
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
|
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
|
-
+
+
-
+
|
/*
* Start the Notifier thread if necessary.
*/
Tcl_MutexLock(¬ifierMutex);
if (notifierCount == 0) {
if (TclpThreadCreate(¬ifierThread, NotifierThreadProc, NULL) != TCL_OK) {
if (TclpThreadCreate(¬ifierThread, NotifierThreadProc, NULL)
!= TCL_OK) {
panic("Tcl_InitNotifier: unable to start notifier thread");
}
}
notifierCount++;
/*
* Wait for the notifier pipe to be created.
*/
while (triggerPipe < 0) {
Tcl_ConditionWait(¬ifierCV, ¬ifierMutex, NULL);
}
Tcl_MutexUnlock(¬ifierMutex);
#endif
return tsdPtr;
return (ClientData) tsdPtr;
}
/*
*----------------------------------------------------------------------
*
* Tcl_FinalizeNotifier --
*
|