To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.roboticsOpen lugnet.robotics in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / 7800
7799  |  7801
Subject: 
Re: bug in semaphore code (was Re: Announce: NQCIPC update
Newsgroups: 
lugnet.robotics
Date: 
Sat, 30 Oct 1999 00:17:42 GMT
Viewed: 
1181 times
  
In lugnet.robotics, Robert Munafo writes:
[...]
Dave Baum and I and a few others talked about this issue 4 weeks ago in this
thread:

http://www.lugnet.com/robotics/rcx/nqc/?n=172

The result was code that properly handles the lockstep starvation problem as
well as making sure that only one task uses the semaphore at any given time.
The solution requires the tasks to have task ID numbers.

I will repeat the proper code here:
[...]

Robert,
Cool stuff.  I just added it here:

   http://www.lugnet.com/robotics/rcx/nqc/?p=code

--Todd



Message has 2 Replies:
  Re: bug in semaphore code (was Re: Announce: NQCIPC update
 
Todd, this is CoolBut: It does not appear to appear from NNTP. Is it your intention to have, um.. lugnet.robotics.rcx.nqc.code ?? I like the idea a lot of having a code repository... (25 years ago, 1-Nov-99, to lugnet.robotics)
  strange sample code area in LUGNET (was Re: bug in semaphore code (was Re: Announce: NQCIPC update
 
What is (URL) why are there no links connecting the rest of (URL) to it? (...) (25 years ago, 1-Nov-99, to lugnet.robotics)

Message is in Reply To:
  bug in semaphore code (was Re: Announce: NQCIPC update
 
Your semaphore acquire algorithm isn't too good. Here is your code: #define sem_acquire(s) until (s == 0); s = 1; If two tasks are waiting for the semaphore at the same time, it is quite likely that both will get it: // (s is currently nonzero) task (...) (25 years ago, 29-Oct-99, to lugnet.robotics)

6 Messages in This Thread:



Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR