473,320 Members | 1,857 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Where can I learn about Multithreading for C

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
12 1916
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

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

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
"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
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

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
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
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
<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
"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
"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jean-Yves Nief | last post by:
hello, I have written a script which is performing some tasks in multithreading mode: the main thread is opening a connection to a distant server and all the threads that I start will have to...
1
by: dixp | last post by:
I'm new to writing multithreaded apps and I have a design question. I have a winforms app and a class which has a method that does processing which is time intensive. I want the user to be able...
47
by: mihai | last post by:
What does the standard say about those two? Is any assurance that the use of STL is thread safe? Have a nice day, Mihai.
5
by: sarge | last post by:
I would like to know how to perform simple multithreading. I had created a simple form to test out if I was multithreading properly, but got buggy results. Sometime the whole thig would lock up...
9
by: tommy | last post by:
hi, i have found a example for multithreading and asp.net http://www.fawcette.com/vsm/2002_11/magazine/features/chester/ i want to speed up my website ... if my website is starting, they...
2
by: Rich | last post by:
Hello, I have set up a multithreading routine in a Test VB.net proj, and it appears to be working OK in debug mode and I am not using synchronization. Multithreading is a new thing for me, and...
5
by: sandy82 | last post by:
Whats actuallly multithreading is ... and how threading and multithreading differ . Can any1 guide how multithreading is used on the Web .. i mean a practical scenario in which u use...
4
by: boo73uk | last post by:
Hi All, I'm going to rewrite a VB6 app to VB.net and I need some pointers. Basically this app spawns simultaneous,multiple, independant ActiveX.exe 'workers' which query a SQL Server database and...
7
by: Ray | last post by:
Hello, Greetings! I'm looking for a solid C++ multithreading book. Can you recommend one? I don't think I've seen a multithreading C++ book that everybody thinks is good (like Effective C++ or...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.