Re: [9fans] setitimer equivalent, and sigvtalarm equivalent

2015-05-02 Thread yoann padioleau
Hi, Yes I think you’re right. Indeed the machine has one timer interrupt and it’s enough for the kernel to demultiplex it over many processes who each can have different alarm requirments. Thx. > On May 2, 2015, at 8:06 AM, erik quanstrom wrote: > >> I’m not sure I understand your proposal. >>

Re: [9fans] setitimer equivalent, and sigvtalarm equivalent

2015-05-02 Thread cinap_lenrek
won't you need some kind of flow control in this? just hammering notes onto a process constantly might prevent that process from doing any progress and even stack overflow as signal handlers are reentrant on unix/ape. i remember that these timer signals where handled specially in the linux kernel w

Re: [9fans] setitimer equivalent, and sigvtalarm equivalent

2015-05-02 Thread erik quanstrom
> I’m not sure I understand your proposal. > > But looking more at the code I need to port, an interpreter, I think > the main issue is that the interpreter relies on sigvtalarm as > a way to preempt the interpreted program while allowing > the user program to use only sigalarm. So more generally

Re: [9fans] setitimer equivalent, and sigvtalarm equivalent

2015-05-01 Thread Skip Tavakkolian
one way to solve this would be to fork as many procs as there are timers; each would sleep the length of its timer value and then postnote an identifying artificial note (vtalarm, fooalarm, etc.) to the parent process. the parent process then interprets the artificial note as a particular type of

Re: [9fans] setitimer equivalent, and sigvtalarm equivalent

2015-04-30 Thread yoann padioleau
Hi, I’m not sure I understand your proposal. But looking more at the code I need to port, an interpreter, I think the main issue is that the interpreter relies on sigvtalarm as a way to preempt the interpreted program while allowing the user program to use only sigalarm. So more generally the pro

Re: [9fans] setitimer equivalent

2015-04-29 Thread erik quanstrom
On Tue Apr 28 21:30:24 PDT 2015, aryx.pada...@gmail.com wrote: > Hi, > > I’m trying to port some code to plan9 using APE > but I can’t find the setitimer function in any include/ape/ files. > What is the equivalent to setitimer under plan9? if you're ok on using nsec() as your time source, select

Re: [9fans] setitimer equivalent

2015-04-28 Thread lucio
> Sorry, I missed the extra 'i' in there. So is the requirement to get all > three of those time domains supported? Supporting all three looks to me > like something one would need for building real time systems or a profiling > tool? For the record, the NetBSD man pages suggest that Posix has d

Re: [9fans] setitimer equivalent

2015-04-28 Thread James A. Robinson
Sorry, I missed the extra 'i' in there. So is the requirement to get all three of those time domains supported? Supporting all three looks to me like something one would need for building real time systems or a profiling tool? On Tue, Apr 28, 2015 at 9:57 PM wrote: > > I'm not familiar with a

Re: [9fans] setitimer equivalent

2015-04-28 Thread lucio
> I'm not familiar with a function named settimer, is that from Windows? > Given the name, would sleep/alarm fit your requirements? According to the Ubuntu man pages, setitimer(2) operates on one of three interval timers: ral, virtual and profile. It could take quite a bit of effort to port this

Re: [9fans] setitimer equivalent

2015-04-28 Thread James A. Robinson
I'm not familiar with a function named settimer, is that from Windows? Given the name, would sleep/alarm fit your requirements? http://plan9.bell-labs.com/magic/man2html/2/sleep On Tue, Apr 28, 2015 at 9:31 PM yoann padioleau wrote: > Hi, > > I’m trying to port some code to plan9 using APE > bu

[9fans] setitimer equivalent

2015-04-28 Thread yoann padioleau
Hi, I’m trying to port some code to plan9 using APE but I can’t find the setitimer function in any include/ape/ files. What is the equivalent to setitimer under plan9?