L
LeTubs
Hi
I'm not sure if this is correct ...place to post but here goes
This is what i'm trying to do, I want to write a signal / alarm handler
( I don't know which hence the posting here, as once I know the proper
name /useage then I'll use google to try and find out more
information )....
Thus any tips or pointers would be helpful (and I'm using a UNIX variant as
OS)
Many Thanks
David
the (?) means I'm not sure if I need the variable or not...
xxxxxxx( &MyTimeFunction, (?)(void *)SleepCounter );
do_some_other_work(......)
..
..
..
/* Check to see if the sleep counter has been set (ie it has
waited a specific time or timeout period
*/
xxxxxxx( SleepCounter );
void * MyTimeFunction( void * arg ){
int MySleepCounter = (int) arg;
for ( i = 0; i < SOME_SYSTEM_COUNTER; i++ ){}
/* Not sure on this bit also but want to set a value of 1
to denote the sleep time has been set
*/
SleepCounter = 1;
}
I'm not sure if this is correct ...place to post but here goes
This is what i'm trying to do, I want to write a signal / alarm handler
( I don't know which hence the posting here, as once I know the proper
name /useage then I'll use google to try and find out more
information )....
Thus any tips or pointers would be helpful (and I'm using a UNIX variant as
OS)
Many Thanks
David
the (?) means I'm not sure if I need the variable or not...
xxxxxxx( &MyTimeFunction, (?)(void *)SleepCounter );
do_some_other_work(......)
..
..
..
/* Check to see if the sleep counter has been set (ie it has
waited a specific time or timeout period
*/
xxxxxxx( SleepCounter );
void * MyTimeFunction( void * arg ){
int MySleepCounter = (int) arg;
for ( i = 0; i < SOME_SYSTEM_COUNTER; i++ ){}
/* Not sure on this bit also but want to set a value of 1
to denote the sleep time has been set
*/
SleepCounter = 1;
}