473,413 Members | 1,799 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,413 software developers and data experts.

monitors in C?

Hi,

I'm used to enforcing mutual exclusion (with monitors)
in Java. Any pointers as to how to implement this in C on Linux?
ie. I want to protect a shared object from access to more than one thread
at a time.

Andreas R.
Nov 14 '05 #1
2 4221
Andreas Røsdal wrote:

Hi,

I'm used to enforcing mutual exclusion (with monitors)
in Java. Any pointers as to how to implement this in C on Linux?
ie. I want to protect a shared object from access to more than one thread
at a time.

There are no facilities for this in ISO Standard C. You need
platform-specific extensions. I would suggest a Linux or perhaps
comp.unix.programmer.

Brian Rodenborn
Nov 14 '05 #2
On Fri, 6 Feb 2004 22:50:02 +0100, in comp.lang.c , Andreas Røsdal
<an******@stud.ntnu.no> wrote:
Hi,

I'm used to enforcing mutual exclusion (with monitors)
in Java. Any pointers as to how to implement this in C on Linux?
ie. I want to protect a shared object from access to more than one thread
at a time.


Sounds like you want to use mutexes. This is not properly a C question but
a linux one, since C doesn't have native support for threads.

--
Mark McIntyre
CLC FAQ <http://www.eskimo.com/~scs/C-faq/top.html>
CLC readme: <http://www.angelfire.com/ms3/bchambless0/welcome_to_clc.html>
----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! >100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---
Nov 14 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: aundrenash | last post by:
Hello, I'm a beginning graphic/web designer. I created a website with a background graphic that is 800x640 pixels. The problem is on my screen it fits like it should (no scrolling necessary etc.)...
2
by: datapro01 | last post by:
Running db2 8.1 on aix 5.1. We are testing some Quest database tools and have run into a situation where we keep getting the following error message when trying to use the SQL analysis tool. ...
0
by: Deano | last post by:
As this is the only technical newsgroup I read and contribute to I hope it's ok to ask a quick bit of advice about small footprint monitors. Basically I can't find any info about these kind of...
1
by: JMM | last post by:
I'm writing a control program that will require a lot of screen real estate to interact with the user. One thought I had on how to do this was to use a dual output display adapter and two...
0
by: Ian Rutherford | last post by:
I'm currently trying to do something with VB .net that I'm having a lot of difficulty with. Basically, I need to be able to display a form on any monitor I choose. So, I have to enumerate all...
0
by: Brian | last post by:
I have an small graphical app in c# where a main form controls the graphical data on two other forms depending on input data. I am looking for a way to direct these two controlled forms to be...
2
by: Darin | last post by:
In my program I save the position of the form so the next time the user logs in and gets to that form it is in the same place. This works great. But I have run into an issue. Some users have 2...
2
by: Cindy | last post by:
I've been using dual monitors for about a year now (absolutely love it), but have run into a weird situation with Access 2000 lately. I loaded a database on two PC's that do NOT have dual...
0
by: Ayushi Mehra | last post by:
Samsung SyncMaster 940 NW Monitors inch, LCD, Colour monitor consumes 38 watts of power per hour, has digital user controls and a maximum resolution of 1280x1024 dpi. The screen is flat with...
4
by: jonhmardona | last post by:
thanks for sharing guys ................. I am a student filmmaker and I have been looking at investing in higher end editing programs, but I like using dual monitors for that. I have heard it is...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.