Overview
| Artifact ID: | a3f5332e736ae0f06ce49e2ea88f0c875111fff9 |
|---|---|
| Ticket: | 659131ffffffffffffffffffffffffffffffffff
development targets: Complete pthreads? |
| User & Date: | vasiljevic on 2003-11-27 01:23:37 |
Changes
- icomment:
Logged In: YES user_id=95086 As promised, here is the small list of things I'd like to TIP. Add new calls: Tcl_SetThreadSpecificData(keyPtr, data); Tcl_GetThreadSpecificData(keyPtr); Tcl_CreateThreadSpecificData(keyPtr, cleanupCallback); The idea is to introduce better handling of thread specific data for cleanup purposes. The current Tcl implementation with simple exit callbacks shows some limitations. Add new calls: Tcl_MutexTryLock(mutexPtr); Tcl_SetMutexName(mutexPtr, mutexName); Tcl_GetMutexName(mutexPtr); Tcl_GetMutexLockAttempts(mutexPtr); Tcl_GetMutexLockWaits(mutexPtr); The idea here is to extend the mutex structure to include some housekeeping counters. This would allow for monitoring locking hotspots. Add new calls: Tcl_ConditionSignal(condPtr) Tcl_ConditionWaitEx(condPtr, mutexPtr, timePtr) The first one is simply missing. The second one would return the cause of the exit (timer expired, or variable signalled) which is not reported by the current Tcl_ConditionWait() implementation. Add new calls: Tcl_RWLockWriteLock(rwlockPtr); Tcl_RWLockReadLock(rwlockPtr); Tcl_RWLockUnlock(rwlockPtr); Not generally needed since could be implemented by existing primitives, but simplifies work for some people. This is a goodie only. For the Tcl extension, this can be done in the extension itself, so no core changes would be needed. Now, the reference implementation is pending. I hope to get some time in next couple of weeks and get it (finally) done. Is there anything you might add to this?
- login: "vasiljevic"
- mimetype: "text/plain"
- username: "vasiljevic"