Go to the FreeLists Home Page Home Signup Help Login
 



[openbeosnetteam] || [Date Prev] [04-2002 Date Index] [Date Next] || [Thread Prev] [04-2002 Thread Index] [Thread Next]

[openbeosnetteam] Re: Ping & timers...

  • From: "Bruno G. Albuquerque" <bga@xxxxxxxxxxxxx>
  • To: openbeosnetteam@xxxxxxxxxxxxx
  • Date: Tue, 02 Apr 2002 09:59:07 EST (-0300)
> The ping application uses setitimer and friends... For those who are 
> unaware
> it's a function in unix land that allows you to specify a timeout and 
> then
> have a SIGALRM sent to the process. Now, before i go mad and write 
> all sorts
> of code anyone else want to take this on? We basically either need a
> replacement or an alternative method. I've thought about maybe a 
> thread
> running and a list of threads/processes to signal at a given time, 
> but as
> long as it works... Nice, straightforward Be programming! Just what a 
> lot of
> have said you'd be interested in!
> 
> I'll be committing another big set of changes and the ping.c file 
> later
> today.

[/boot/home]> hgrep alarm
/boot/develop/headers/be/kernel/OS.h:/* alarms */
/boot/develop/headers/be/kernel/OS.h:   B_ONE_SHOT_ABSOLUTE_ALARM = 1,  
/* alarm is one-shot and time is specified absolutely */
/boot/develop/headers/be/kernel/OS.h:   B_ONE_SHOT_RELATIVE_ALARM = 2,  
/* alarm is one-shot and time is specified relatively */
/boot/develop/headers/be/kernel/OS.h:   B_PERIODIC_ALARM = 3                   
/* alarm is periodic and time is the period */
/boot/develop/headers/be/kernel/OS.h:extern _IMPEXP_ROOT bigtime_t      
set_alarm(bigtime_t when, uint32 flags);
/boot/develop/headers/posix/signal.h:#define SIGALRM    14      /* an 
alarm has gone off (see alarm()) */
/boot/develop/headers/posix/unistd.h:extern uint                
alarm(unsigned int sec);
/boot/develop/headers/posix/unistd.h:/* XXXdbg ualarm() */
[/boot/home]>

Maybe this can help? I noticed the BeOS ping (the one that comes with 
BONE) do not start another thread so it must use something from what is 
show above... Probably alarm().

-Bruno





--
Fortune Cookie Says:

I predict that today will be remembered until tomorrow!






[ Home | Signup | Help | Login | Archives | Lists ]

All trademarks and copyrights within the FreeLists archives are owned by their respective owners.
Everything else ©2007 Avenir Technologies, LLC.