To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 277
276  |  278
Subject: 
Re: signals / legOS internals
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Thu, 24 Jun 1999 17:43:49 GMT
Viewed: 
1140 times
  
I wrote:
I think the following API would be nice:

  #define EV_ ... // event mask bits

  wait_event(int mask);

wait_event waits for any event specified by the mask to occur, returns when
that has happened; implementation can be made very efficient on top of (1)

This is mechanism I chose to implement in the "unreleased custom version"
of Librcx I keep mentioning - a version that will get released at some
point, when it's all done, but I'm in no hurry.

I should add that since many things are vectored in this version of Librcx,
overriding functionality is easy for the advanced user to do.  For example:

extern void (*__event_vector)(void);

void my_setup_func()
{
    // ...
    __event_vector = my_handler_func;
    // ...
}

It turns out that __event_vector is equivalent to the signal mechanism
being discussed.  The signal id (if you'd expect that) is implicit in the
address of __event_vector; the updating of the signal handler must be done
explicitly by managing __event_vector yourself.

Actually, I bet this is slightly different from the signal mechanism being
discussed, which probably has one vector per thread/process.  Librcx only
has a single, global set of vectors.

-Kekoa



Message has 1 Reply:
  Re: signals / legOS internals
 
(...) So, should I abandon my implementation? If something every bit as good is already there, it may be silly for me to continue. I haven't looked at Librcx yet, so I don't completely understand how it works. I think one of the original reasons for (...) (25 years ago, 26-Jun-99, to lugnet.robotics.rcx.legos)

Message is in Reply To:
  Re: signals / legOS internals
 
(...) I think you're missing the point. Now correct me if I'm wrong, Lou -- I believe the intent of the signal mechanism is to allow a way to specify a function to run when a system event occurs: e.g. a message arrives across the IR port. It is (...) (25 years ago, 24-Jun-99, to lugnet.robotics.rcx.legos)

32 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