summaryrefslogtreecommitdiff
path: root/Python/thread_nt.h
AgeCommit message (Collapse)AuthorLines
2002-03-05backport tim_one's checkin ofMichael W. Hudson-14/+1
revision 2.22 of thread_nt.h SF patch 522961: Leak in Python/thread_nt.h, from Gerald S. Williams. A file-static "threads" dict mapped thread IDs to Windows handles, but was never referenced, and entries never got removed. This gets rid of the YAGNI-dict entirely. Bugfix candidate.
2001-10-16Fix a bug in the previous checkin. The wrong bootstrap function wasGuido van Rossum-1/+1
passed to _beginthread().
2001-10-16Partial patch from SF #452266, by Jason Petrone.Guido van Rossum-3/+45
This changes Pythread_start_thread() to return the thread ID, or -1 for an error. (It's technically an incompatible API change, but I doubt anyone calls it.)
2001-08-29SF bug [#456252] Python should never stomp on [u]intptr_t.Tim Peters-2/+2
pyport.h: typedef a new Py_intptr_t type. DELICATE ASSUMPTION: That HAVE_UINTPTR_T implies intptr_t is available as well as uintptr_t. If that turns out not to be true, things must get uglier (C99 wants both, so I think it's an assumption we're *likely* to get away with). thread_nt.h, PyThread_start_new_thread: MS _beginthread is documented as returning unsigned long; no idea why uintptr_t was being used. Others: Always use Py_[u]intptr_t, never [u]intptr_t directly.
2000-09-01REMOVED all CWI, CNRI and BeOpen copyright markings.Guido van Rossum-9/+0
This should match the situation in the 1.6b1 tree.
2000-08-07-- from Trent Mick: [Patch #101010] replace use of INT_PTRFredrik Lundh-5/+1
with uintptr_t (fix MSVC 5.0 build)
2000-07-22Mass ANSIfication of function definitions. Doesn't cover all 'extern'Thomas Wouters-2/+2
declarations yet, those come later.
2000-06-30Change copyright notice - 2nd try.Guido van Rossum-6/+0
2000-06-30Change copyright notice.Guido van Rossum-21/+6
2000-06-30Trent Mick <trentm@activestate.com>:Fred Drake-11/+11
The common technique for printing out a pointer has been to cast to a long and use the "%lx" printf modifier. This is incorrect on Win64 where casting to a long truncates the pointer. The "%p" formatter should be used instead. The problem as stated by Tim: > Unfortunately, the C committee refused to define what %p conversion "looks > like" -- they explicitly allowed it to be implementation-defined. Older > versions of Microsoft C even stuck a colon in the middle of the address (in > the days of segment+offset addressing)! The result is that the hex value of a pointer will maybe/maybe not have a 0x prepended to it. Notes on the patch: There are two main classes of changes: - in the various repr() functions that print out pointers - debugging printf's in the various thread_*.h files (these are why the patch is large) Closes SourceForge patch #100505.
2000-06-29- workaround to make 1.6 build under MSVC 5.0. hopefully,Fredrik Lundh-0/+4
trent (who broke it in the first place ;-) will come up with a cleaner solution.
2000-06-28Trent Mick's Win64 changes: size_t vs. int or long; also some overflowGuido van Rossum-2/+5
tests.
2000-05-11Bill Tutt:Guido van Rossum-1/+24
Calling Sleep(0) for a spinlock can cause a priority inversion, adding comments to explain what's going on.
2000-05-05Quick fix by Mark Hammond -- Yakov changed a dprintf call but it wasGuido van Rossum-1/+1
referencing an undefined variable, so we better change it back.
2000-05-04Fast NonRecursiveMutex support by Yakov Markovitch, markovitch@iso.ru,Guido van Rossum-25/+113
who wrote: Here's the new version of thread_nt.h. More particular, there is a new version of thread lock that uses kernel object (e.g. semaphore) only in case of contention; in other case it simply uses interlocked functions, which are faster by the order of magnitude. It doesn't make much difference without threads present, but as soon as thread machinery initialised and (mostly) the interpreter global lock is on, difference becomes tremendous. I've included a small script, which initialises threads and launches pystone. With original thread_nt.h, Pystone results with initialised threads are twofold worse then w/o threads. With the new version, only 10% worse. I have used this patch for about 6 months (with threaded and non-threaded applications). It works remarkably well (though I'd desperately prefer Python was free-threaded; I hope, it will soon).
2000-01-20The rest of the changes by Trent Mick and Dale Nagata for warning-freeGuido van Rossum-1/+1
compilation on NT Alpha. Mostly added casts etc.
1998-12-21Thanks to Chris Herborth, the thread primitives now have proper Py*Guido van Rossum-45/+45
names in the source code (they already had those for the linker, through some smart macros; but the source still had the old, un-Py names).
1997-08-14Use _beginthread() and _endthread() in favor of CreateThread() andGuido van Rossum-16/+8
ExitThread(). As discussed in c.l.p, this takes care of initialization and finalization of thread-local storage allocated by the C runtime system. Not sure whether non-MS compilers grok this though (but who cares :-).
1996-10-25New permission notice, includes CNRI.Guido van Rossum-12/+19
1996-10-08Sjoerd's thread changes (including down_sema typo fix).Guido van Rossum-1/+5
Note: waitflag not supported on NT.
1995-01-17nt thread supportGuido van Rossum-0/+245