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.15 2004/04/06 22:25:57 dgp Exp $
*/
#include "tclInt.h"
#include <signal.h>
extern TclStubs tclStubs;
extern Tcl_NotifierProcs tclOriginalNotifier;
|
|
|
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.16 2004/06/22 13:09:00 vasiljevic Exp $
*/
#include "tclInt.h"
#include <signal.h>
extern TclStubs tclStubs;
extern Tcl_NotifierProcs tclOriginalNotifier;
|
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
|
/*
* Start the Notifier thread if necessary.
*/
Tcl_MutexLock(¬ifierMutex);
if (notifierCount == 0) {
if (Tcl_CreateThread(¬ifierThread, NotifierThreadProc, NULL,
TCL_THREAD_STACK_DEFAULT, TCL_THREAD_NOFLAGS) != TCL_OK) {
Tcl_Panic("Tcl_InitNotifier: unable to start notifier thread");
}
}
notifierCount++;
/*
|
|
|
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
|
/*
* Start the Notifier thread if necessary.
*/
Tcl_MutexLock(¬ifierMutex);
if (notifierCount == 0) {
if (TclpThreadCreate(¬ifierThread, NotifierThreadProc, NULL,
TCL_THREAD_STACK_DEFAULT, TCL_THREAD_NOFLAGS) != TCL_OK) {
Tcl_Panic("Tcl_InitNotifier: unable to start notifier thread");
}
}
notifierCount++;
/*
|