Tcl Source Code

Check-in [5af173439a]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:
* unix/tclUnixNotfy.c (NotifierThreadProc): init numFdBits [Bug 1079286]
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | core-8-4-9 | core-8-4-branch
Files: files | file ages | folders
SHA1: 5af173439a22c62c0783524b8948f1ff29498e8f
User & Date: hobbs 2004-12-07 00:07:54
Context
2004-12-09
09:24
Minor doc fixes check-in: d2b3f026a6 user: dkf tags: core-8-4-branch
2004-12-07
00:07
* unix/tclUnixNotfy.c (NotifierThreadProc): init numFdBits [Bug 1079286]
check-in: 5af173439a user: hobbs tags: core-8-4-9, core-8-4-branch
2004-12-03
00:37
removed extra .TP macro check-in: 25a56ea140 user: hobbs tags: core-8-4-branch
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to ChangeLog.

1
2
3





4
5
6
7
8
9
10
2004-12-02  Jeff Hobbs  <[email protected]>

	*** 8.4.9 TAGGED FOR RELEASE ***






	* changes: updated for 8.4.9 release

2004-12-02  Vince Darley  <[email protected]>

	* generic/tclIOUtil.c: fix and new tests for [Bug 1074671] to
	* tests/fileSystem.test: ensure tilde paths are not returned
|


>
>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2004-12-06  Jeff Hobbs  <[email protected]>

	*** 8.4.9 TAGGED FOR RELEASE ***

	* unix/tclUnixNotfy.c (NotifierThreadProc): init numFdBits
	[Bug 1079286]

2004-12-02  Jeff Hobbs  <[email protected]>

	* changes: updated for 8.4.9 release

2004-12-02  Vince Darley  <[email protected]>

	* generic/tclIOUtil.c: fix and new tests for [Bug 1074671] to
	* tests/fileSystem.test: ensure tilde paths are not returned

Changes to unix/tclUnixNotfy.c.

7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
...
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
...
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
....
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
 *	../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.11.2.6 2004/11/24 20:19:22 kennykb Exp $
 */

#include "tclInt.h"
#include "tclPort.h"
#include <signal.h> 

extern TclStubs tclStubs;
................................................................................
    ClientData clientData;	/* Not used. */
{
    ThreadSpecificData *tsdPtr;
    fd_set readableMask;
    fd_set writableMask;
    fd_set exceptionalMask;
    int fds[2];
    int i, status, numFdBits, receivePipe;
    long found;
    struct timeval poll = {0., 0.}, *timePtr;
    char buf[2];

    if (pipe(fds) != 0) {
	panic("NotifierThreadProc: could not create trigger pipe.");
    }
................................................................................
		}
		if ( FD_ISSET( i, &(tsdPtr->checkMasks.exceptional) )
		     && FD_ISSET( i, &exceptionalMask ) ) {
		    FD_SET( i, &(tsdPtr->readyMasks.exceptional) );
		    found = 1;
		}
	    }
			       
            if (found || (tsdPtr->pollState & POLL_DONE)) {
                tsdPtr->eventReady = 1;
		if (tsdPtr->onList) {
		    /*
		     * Remove the ThreadSpecificData structure of this
		     * thread from the waiting list. This prevents us from
		     * continuously spining on select until the other
		     * threads runs and services the file event.
		     */
	    
		    if (tsdPtr->prevPtr) {
			tsdPtr->prevPtr->nextPtr = tsdPtr->nextPtr;
		    } else {
			waitingListPtr = tsdPtr->nextPtr;
		    }
		    if (tsdPtr->nextPtr) {
			tsdPtr->nextPtr->prevPtr = tsdPtr->prevPtr;
................................................................................
		    tsdPtr->onList = 0;
		    tsdPtr->pollState = 0;
		}
		Tcl_ConditionNotify(&tsdPtr->waitCV);
            }
        }
	Tcl_MutexUnlock(&notifierMutex);
	
	/*
	 * Consume the next byte from the notifier pipe if the pipe was
	 * readable.  Note that there may be multiple bytes pending, but
	 * to avoid a race condition we only read one at a time.
	 */

	if ( FD_ISSET( receivePipe, &readableMask ) ) {






|







 







|







 







|









|







 







|







7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
...
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
...
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
....
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
 *	../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.11.2.7 2004/12/07 00:07:54 hobbs Exp $
 */

#include "tclInt.h"
#include "tclPort.h"
#include <signal.h> 

extern TclStubs tclStubs;
................................................................................
    ClientData clientData;	/* Not used. */
{
    ThreadSpecificData *tsdPtr;
    fd_set readableMask;
    fd_set writableMask;
    fd_set exceptionalMask;
    int fds[2];
    int i, status, numFdBits = 0, receivePipe;
    long found;
    struct timeval poll = {0., 0.}, *timePtr;
    char buf[2];

    if (pipe(fds) != 0) {
	panic("NotifierThreadProc: could not create trigger pipe.");
    }
................................................................................
		}
		if ( FD_ISSET( i, &(tsdPtr->checkMasks.exceptional) )
		     && FD_ISSET( i, &exceptionalMask ) ) {
		    FD_SET( i, &(tsdPtr->readyMasks.exceptional) );
		    found = 1;
		}
	    }

            if (found || (tsdPtr->pollState & POLL_DONE)) {
                tsdPtr->eventReady = 1;
		if (tsdPtr->onList) {
		    /*
		     * Remove the ThreadSpecificData structure of this
		     * thread from the waiting list. This prevents us from
		     * continuously spining on select until the other
		     * threads runs and services the file event.
		     */

		    if (tsdPtr->prevPtr) {
			tsdPtr->prevPtr->nextPtr = tsdPtr->nextPtr;
		    } else {
			waitingListPtr = tsdPtr->nextPtr;
		    }
		    if (tsdPtr->nextPtr) {
			tsdPtr->nextPtr->prevPtr = tsdPtr->prevPtr;
................................................................................
		    tsdPtr->onList = 0;
		    tsdPtr->pollState = 0;
		}
		Tcl_ConditionNotify(&tsdPtr->waitCV);
            }
        }
	Tcl_MutexUnlock(&notifierMutex);

	/*
	 * Consume the next byte from the notifier pipe if the pipe was
	 * readable.  Note that there may be multiple bytes pending, but
	 * to avoid a race condition we only read one at a time.
	 */

	if ( FD_ISSET( receivePipe, &readableMask ) ) {