How to use Mutex in C

D

dharmdeep

Hi Friends,
I have made a client server application in which multiple
clients can interact with server. but when two or more clients get
connected at the same time then memory error occurs. So I think i have
to use some synchronization tecnique to get things working properly. i
thought of using mutex. Can anybody help me with some sample code as
how to use mutex in C under windows.
 
W

Walter Roberson

how to use mutex in C under windows.

That's a question for a Windows programming newsgroup: comp.lang.c
only deals with that which can be programmed using standard C with
no OS extensions.
 
I

Ian Collins

Hi Friends,
I have made a client server application in which multiple
clients can interact with server. but when two or more clients get
connected at the same time then memory error occurs. So I think i have
to use some synchronization tecnique to get things working properly. i
thought of using mutex. Can anybody help me with some sample code as
how to use mutex in C under windows.
You asked pretty much the same question a couple of days ago and you'll
still get the same answers today!
 
M

mark_bluemel

Hi Friends,
I have made a client server application in which multiple
clients can interact with server. but when two or more clients get
connected at the same time then memory error occurs. So I think i have
to use some synchronization tecnique to get things working properly. i
thought of using mutex. Can anybody help me with some sample code as
how to use mutex in C under windows.

Mutexes are part of threading, not part of the C language (which, I
think explicitly, does not understand threads). You'd do better to ask
in a threading newsgroup, or perhaps find a good online or printed
reference.

The principles are simple, but the details will depend on the threading
implementation.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top