Questions tagged [pthreads-win32]

pthreads-win32 provides an implementation of pthreads for Win32.

pthread-win32 - The POSIX 1003.1-2001 standard defines an application programming interface (API) for writing multithreaded applications. This interface is known more commonly as pthreads. A good number of modern operating systems include a threading library of some kind: Solaris (UI) threads, Win32 threads, DCE threads, DECthreads, or any of the draft revisions of the pthreads standard. The trend is that most of these systems are slowly adopting the pthreads standard API, with application developers following suit to reduce porting woes.

Win32 does not, and is unlikely to ever, support pthreads natively. This project seeks to provide a freely available and high-quality solution to this problem.

Various individuals have been working on independent implementations of this well-documented and standardised threading API, but most of them never see the light of day. The tendency is for people to only implement what they personally need, and that usually does not help others. This project attempts to consolidate these implementations into one implementation of pthreads for Win32.

Level of standards conformance

Pthreads-win32 currently implements a large subset of the POSIX standard threads related API. See our conformance page for a complete list of options and functions implemented as well as those that aren't.

HTML formatted manual pages are now available inside the package and on this site. Peruse them for additional Pthreads-win32 information.

How does it work?

The Win32 pthreads is normally implemented as a dynamic link library (DLL). This has some notable advantages from the Win32 point of view, but it also more closely models existing pthread libraries on UNIX which are usually shared objects (e.g. libpthread.so). Please note though, that the library can also be built for static linking if necessary.

Official Website: http://www.sourceware.org/pthreads-win32/

Useful Linkes:

52 questions
0
votes
2 answers

Mergesort pThread implementation taking same time as single-threaded

(I have tried to simplify this as much as i could to find out where I'm doing something wrong.) The ideea of the code is that I have a global array *v (I hope using this array isn't slowing things down, the threads should never acces the same value…
dany123
  • 27
  • 6
0
votes
2 answers

Pthread on Windows- Undefined reference to sleep

I've been trying to implement a dining philosopher solution, using pthreads, i try to run it on my Lenovo yoga2pro pc (runs on windows 8.1) even though i have pthreads for windows installed through mingw installation manager i get this error: it…
0
votes
0 answers

adding extra (pthread) dll in visual studio 2010

I am trying to run the producer-consumer code in visual studio 2010 . I copied code from below location http://www.dailyfreecode.com/code/producer-consumer-problem-thread-1105.aspx# My os is windows (64bit) I have downloaded the required…
Ashwin
  • 411
  • 1
  • 10
  • 28
0
votes
0 answers

Why can't I terminate the process in the other thread using pthread win32?

Here is my code snippet, Click here to view the full code. int main (void) { //Multi-Thread pthread_t Key_Stroke_Func; pthread_create (&Key_Stroke_Func, NULL, (void*)Get_Key_Stroke, NULL); ........ } void *Get_Key_Stroke (void) { …
Kevin Dong
  • 5,001
  • 9
  • 29
  • 62
0
votes
0 answers

Issue with pthread_cond_timedwait on win32

I'm using pthread for a program used both in Windows and Linux environments. For windows I am using pthread for Win 32 ver 2.9.1 (latest). I need to use pthread_cond_timedwait to wait for a time in microsecond resolution. On linux everything works…
Giuseppe
  • 41
  • 4
0
votes
2 answers

pthread_create not enough space

I'm using Pthreads with MinGW on Windows. A call to pthread_create returns a error which translates to "Not enough space". What kind of space does it refer to? Is the thread stack space? int scannerThreadReturnValue =…
Salvatore
  • 1,145
  • 3
  • 21
  • 42
1 2 3
4