By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,820 Members | 1,189 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,820 IT Pros & Developers. It's quick & easy.

Where can I learn about Multithreading for C

P: n/a
Hi,

Where on the internet can I learn about Multithreading for C using
functions like WaitForSingleObject(), CreateThread(), CreateMutex()
etc, rather than pthreads.

Thanks,

Barry.

Jun 26 '06 #1
Share this Question
Share on Google+
12 Replies


P: n/a
bg***@yahoo.com writes:
Hi,

Where on the internet can I learn about Multithreading for C using
functions like WaitForSingleObject(), CreateThread(), CreateMutex()
etc, rather than pthreads.


This is off-topic here.

<ot>
Probably the MSDN. The pthreads interface is described in the POSIX
standard and they are available on multiple platforms including, I
believe, Windows. What you are interested in is part of the Win32 API
and available only under Windows.
</ot>

If you need more information try a group that's specialized in your
kind of requests:
comp.programming.threads
com.os.ms-windows.programmer.win32

--
Ioan - Ciprian Tandau
tandau _at_ freeshell _dot_ org (hope it's not too late)
(... and that it still works...)
Jun 26 '06 #2

P: n/a

b...@yahoo.com wrote:
Hi,

Where on the internet can I learn about Multithreading for C using
functions like WaitForSingleObject(), CreateThread(), CreateMutex()
etc, rather than pthreads.


Off topic for the group...

But you're doing yourself no sort of favour of "rather than pthreads".
Using Win32API calls only in your application is a surefire way to lock
yourself into Windows.

Even on Windows you can use Cygwin to emulate pthreads for you.

So stick with pthreads and do things properly.

Tom

Jun 26 '06 #3

P: n/a

b...@yahoo.com wrote:
Hi,

Where on the internet can I learn about Multithreading for C using
functions like WaitForSingleObject(), CreateThread(), CreateMutex()
etc, rather than pthreads.


Off topic for the group...

But you're doing yourself no sort of favour of "rather than pthreads".
Using Win32API calls only in your application is a surefire way to lock
yourself into Windows.

Even on Windows you can use Cygwin to emulate pthreads for you.

So stick with pthreads and do things properly.

Tom

Jun 26 '06 #4

P: n/a
"Tom St Denis" <to********@gmail.com> writes:
b...@yahoo.com wrote:
Hi,

Where on the internet can I learn about Multithreading for C using
functions like WaitForSingleObject(), CreateThread(), CreateMutex()
etc, rather than pthreads.


Off topic for the group...

But you're doing yourself no sort of favour of "rather than pthreads".
Using Win32API calls only in your application is a surefire way to lock
yourself into Windows.

Even on Windows you can use Cygwin to emulate pthreads for you.

So stick with pthreads and do things properly.


I think you can use pthreads for Windows (from RedHat) without needing
to download the entire cygwin. I've never tried it but
ftp://sources.redhat.com/pub/pthreads-win32
may be worth checking.

--
Ioan - Ciprian Tandau
tandau _at_ freeshell _dot_ org (hope it's not too late)
(... and that it still works...)
Jun 26 '06 #5

P: n/a
Hi again,

Sorry for being off topic.

I wanted to do it with pthreads but couldn't get it working. I'm
running Developer Studio 97, and I'm getting the following error when I
try to link pthreadVC2.lib (or pthreadVC1.lib) within my project.
Here's the error -

C:\Program Files\DevStudio\VC\LIB\pthreadVC2.lib : fatal error LNK1106:
invalid file or disk full: cannot seek to 0x42a15b72

What might the problem be?

Thanks for your help,

Barry.
Nelu wrote:
"Tom St Denis" <to********@gmail.com> writes:
b...@yahoo.com wrote:
Hi,

Where on the internet can I learn about Multithreading for C using
functions like WaitForSingleObject(), CreateThread(), CreateMutex()
etc, rather than pthreads.


Off topic for the group...

But you're doing yourself no sort of favour of "rather than pthreads".
Using Win32API calls only in your application is a surefire way to lock
yourself into Windows.

Even on Windows you can use Cygwin to emulate pthreads for you.

So stick with pthreads and do things properly.


I think you can use pthreads for Windows (from RedHat) without needing
to download the entire cygwin. I've never tried it but
ftp://sources.redhat.com/pub/pthreads-win32
may be worth checking.

--
Ioan - Ciprian Tandau
tandau _at_ freeshell _dot_ org (hope it's not too late)
(... and that it still works...)


Jun 26 '06 #6

P: n/a

b...@yahoo.com wrote:
Hi again,

Sorry for being off topic.

I wanted to do it with pthreads but couldn't get it working. I'm
running Developer Studio 97, and I'm getting the following error when I
try to link pthreadVC2.lib (or pthreadVC1.lib) within my project.
Here's the error -

C:\Program Files\DevStudio\VC\LIB\pthreadVC2.lib : fatal error LNK1106:
invalid file or disk full: cannot seek to 0x42a15b72

What might the problem be?


It means the file is invalid. Probably truncated or not a .lib at all.

If you had cygwin you could just do a

objdump -x pthreadVC2.lib

and see if it recognizes the format :-)

.... hint ... get cygwin! Even if you use Visual Studio the shell tools
are very useful.

Tom

Jun 26 '06 #7

P: n/a
bg***@yahoo.com writes:

Nelu wrote:
"Tom St Denis" <to********@gmail.com> writes:
b...@yahoo.com wrote:
> Hi,
>
> Where on the internet can I learn about Multithreading for C using
> functions like WaitForSingleObject(), CreateThread(), CreateMutex()
> etc, rather than pthreads.

Off topic for the group...

But you're doing yourself no sort of favour of "rather than pthreads".
Using Win32API calls only in your application is a surefire way to lock
yourself into Windows.

Even on Windows you can use Cygwin to emulate pthreads for you.

So stick with pthreads and do things properly.

I think you can use pthreads for Windows (from RedHat) without needing
to download the entire cygwin. I've never tried it but
ftp://sources.redhat.com/pub/pthreads-win32
may be worth checking.

Hi again,

Sorry for being off topic.

I wanted to do it with pthreads but couldn't get it working. I'm
running Developer Studio 97, and I'm getting the following error when I
try to link pthreadVC2.lib (or pthreadVC1.lib) within my project.
Here's the error -

C:\Program Files\DevStudio\VC\LIB\pthreadVC2.lib : fatal error LNK1106:
invalid file or disk full: cannot seek to 0x42a15b72

What might the problem be?

Thanks for your help,


Hi, again.
Please don't top-post. I fixed your follow-up.

I haven't used pthreads that much and I have never used them under
Windows. Others on this group may have done it but your best bet of
finding the right answer is to post your questions on the groups I
provided in an earlier reply.

From digging on the Internet:

http://www.cryer.co.uk/brian/mswinsw...k1106ifodf.htm

As you can see, there may be a number of problems, none of them on-topic
here. You should be able to better advice on a newsgroup better suited
for this sort of things.

--
Ioan - Ciprian Tandau
tandau _at_ freeshell _dot_ org (hope it's not too late)
(... and that it still works...)
Jun 26 '06 #8

P: n/a
On 26 Jun 2006 08:15:37 -0700, bg***@yahoo.com wrote:
Hi again,

Sorry for being off topic.

I wanted to do it with pthreads but couldn't get it working. I'm
running Developer Studio 97, and I'm getting the following error when I
try to link pthreadVC2.lib (or pthreadVC1.lib) within my project.
Here's the error -

C:\Program Files\DevStudio\VC\LIB\pthreadVC2.lib : fatal error LNK1106:
invalid file or disk full: cannot seek to 0x42a15b72

What might the problem be?
It's still off topic. You will get much better help on a newsgroup
where it is on topic.
Thanks for your help,


--
Al Balmer
Sun City, AZ
Jun 26 '06 #9

P: n/a
<bg***@yahoo.com> wrote in message
news:11*********************@u72g2000cwu.googlegro ups.com...
Hi again,

Sorry for being off topic.

I wanted to do it with pthreads but couldn't get it working. I'm
running Developer Studio 97, and I'm getting the following error when I
try to link pthreadVC2.lib (or pthreadVC1.lib) within my project.
Here's the error -

C:\Program Files\DevStudio\VC\LIB\pthreadVC2.lib : fatal error LNK1106:
invalid file or disk full: cannot seek to 0x42a15b72

What might the problem be?


If all else fails, you might find a commercial solution cheaper.
See the Compleat Library at our web site. It includes a threads
library that looks like a portable subset of pthreads and works
the same across Unix, Linux, and Windows. And it's part of a
bundle of libraries (including Standard C and C++) all packaged
to work together out of the box.

P.J. Plauger
Dinkumware, Ltd.
http://www.dinkumware.com
Jun 26 '06 #10

P: n/a
"Tom St Denis" <to********@gmail.com> writes:
b...@yahoo.com wrote:
Where on the internet can I learn about Multithreading for C using
functions like WaitForSingleObject(), CreateThread(), CreateMutex()
etc, rather than pthreads.


Off topic for the group...

But you're doing yourself no sort of favour of "rather than pthreads".
Using Win32API calls only in your application is a surefire way to lock
yourself into Windows.

Even on Windows you can use Cygwin to emulate pthreads for you.

So stick with pthreads and do things properly.


<STILL_OFF_TOPIC>
Cygwin is a good thing (I'm using it right now), but if you write code
that depends on it, that code will run only on Windows systems that
have Cygwin installed. If you're planning to distribute your code,
avoiding that requirement would be a good idea. (Cygwin is easy to
install, but that doesn't mean everyone will be willing to install
it.)
</STILL_OFF_TOPIC>

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.
Jun 26 '06 #11

P: n/a
"Keith Thompson" <ks***@mib.org> wrote in message
news:ln************@nuthaus.mib.org...
"Tom St Denis" <to********@gmail.com> writes:
b...@yahoo.com wrote:
Where on the internet can I learn about Multithreading for C using
functions like WaitForSingleObject(), CreateThread(), CreateMutex()
etc, rather than pthreads.
Off topic for the group...

But you're doing yourself no sort of favour of "rather than pthreads".
Using Win32API calls only in your application is a surefire way to lock
yourself into Windows.

Even on Windows you can use Cygwin to emulate pthreads for you.

So stick with pthreads and do things properly.


<STILL_OFF_TOPIC>
Cygwin is a good thing (I'm using it right now), but if you write code
that depends on it, that code will run only on Windows systems that
have Cygwin installed. If you're planning to distribute your code,
avoiding that requirement would be a good idea. (Cygwin is easy to
install, but that doesn't mean everyone will be willing to install
it.)
</STILL_OFF_TOPIC>


<TOPICAL_WHAT_DOES_THAT_MEAN>
Mingw can do most of the things that Cygwin can and does not require a
runtime distrubution. Also, Cygwin is not freeware (but if you need fork()
on win32 and don't want to tangle with the partially implemented PW32, then
you're stuck with it).
</TOPICAL_WHAT_DOES_THAT_MEAN>
--
Keith Thompson (The_Other_Keith) ks***@mib.org
<http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*>
<http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.

Jun 26 '06 #12

P: n/a
Hi,

This problem could possibly be due to the incompatible library file
meant for VC++ 6 and above. I beleive Microsoft had released a Service
Pack for Visual C++ 5.0 to address this issue.

Try compiling it with VC++ 6 and it should work.

Cheers,
Venkatesh.S.C

bg***@yahoo.com wrote:
Hi again,

Sorry for being off topic.

I wanted to do it with pthreads but couldn't get it working. I'm
running Developer Studio 97, and I'm getting the following error when I
try to link pthreadVC2.lib (or pthreadVC1.lib) within my project.
Here's the error -

C:\Program Files\DevStudio\VC\LIB\pthreadVC2.lib : fatal error LNK1106:
invalid file or disk full: cannot seek to 0x42a15b72

What might the problem be?

Thanks for your help,

Barry.
Nelu wrote:
"Tom St Denis" <to********@gmail.com> writes:
b...@yahoo.com wrote:
> Hi,
>
> Where on the internet can I learn about Multithreading for C using
> functions like WaitForSingleObject(), CreateThread(), CreateMutex()
> etc, rather than pthreads.

Off topic for the group...

But you're doing yourself no sort of favour of "rather than pthreads".
Using Win32API calls only in your application is a surefire way to lock
yourself into Windows.

Even on Windows you can use Cygwin to emulate pthreads for you.

So stick with pthreads and do things properly.


I think you can use pthreads for Windows (from RedHat) without needing
to download the entire cygwin. I've never tried it but
ftp://sources.redhat.com/pub/pthreads-win32
may be worth checking.

--
Ioan - Ciprian Tandau
tandau _at_ freeshell _dot_ org (hope it's not too late)
(... and that it still works...)


Jun 30 '06 #13

This discussion thread is closed

Replies have been disabled for this discussion.