summaryrefslogtreecommitdiff
path: root/compat/win32/pthread.c
AgeCommit message (Collapse)AuthorFilesLines
2013-04-28compat/win32/pthread.c: Fix a sparse warningLibravatar Ramsay Jones1-1/+1
Sparse issues a 'Using plain integer as NULL pointer' warning when initializing an pthread_t structure with an '{ 0 }' initializer. The first field of the pthread_t structure has type HANDLE (void *), so in order to suppress the warning, we replace the initializer expression with '{ NULL }'. Signed-off-by: Ramsay Jones <ramsay@ramsay1.demon.co.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-03-07Windows: more pthreads functionsLibravatar Johannes Sixt1-0/+8
This adds: pthread_self pthread_equal pthread_exit pthread_key_create pthread_setspecific pthread_getspecific Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-02-03Typofixes outside documentation areaLibravatar Junio C Hamano1-1/+1
begining -> beginning canonicalizations -> canonicalization comand -> command dewrapping -> unwrapping dirtyness -> dirtiness DISCLAMER -> DISCLAIMER explicitely -> explicitly feeded -> fed impiled -> implied madatory -> mandatory mimick -> mimic preceeding -> preceding reqeuest -> request substition -> substitution Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-29Implement pthread_cond_broadcast on WindowsLibravatar Johannes Sixt1-11/+89
See http://www.cse.wustl.edu/~schmidt/win32-cv-1.html, section "The SignalObjectAndWait solution". But note that this implementation does not use SignalObjectAndWait (which is needed to achieve fairness, but we do not need fairness). Note that our implementations of pthread_cond_broadcast and pthread_cond_signal require that they are invoked with the mutex held that is used in the pthread_cond_wait calls. Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-01-16MSVC: Windows-native implementation for subset of Pthreads APILibravatar Andrzej K. Haczewski1-0/+110
This patch implements native to Windows subset of pthreads API used by Git. It allows to remove Pthreads for Win32 dependency for MSVC, msysgit and Cygwin. [J6t: If the MinGW build was built as part of the msysgit build environment, then threading was already enabled because the pthreads-win32 package is available in msysgit. With this patch, we can now enable threaded code unconditionally.] Signed-off-by: Andrzej K. Haczewski <ahaczewski@gmail.com> Signed-off-by: Johannes Sixt <j6t@kdbg.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>