Re: [linux-audio-dev] sched_setscheduler question ...

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: Re: [linux-audio-dev] sched_setscheduler question ...
From: John Lazzaro (lazzaro_AT_CS.Berkeley.EDU)
Date: Sun Jun 11 2000 - 01:39:23 EEST


> I think I may have a good technique in answer to this question
> I posted to the list yesterday:

And as it turned out, I had thought wrong -- while the code posted
does the function, I missed the mimimum 10ms sleep time in the
kernal code -- so in practice, this is just a complicated way of
sleeping for 10ms. As it turns out, I _think_ that:

void let_SCHED_OTHER_run(void)

{
  /* adapted from code by Gordon W. Ross */
  
  struct timespec sleep_time;
  sigset_t blocked_wake;

  sigemptyset(&blocked_wake);

  sleep_time.tv_sec = 0;
  sleep_time.tv_nsec = 0; /* different from last posting */

  sigtimedwait(&blocked_wake, NULL, &sleep_time);
}

does what I want (it has the right suspend behavior, and I think
it has the "zero wait time" characteristic), however, as I noted
in the last posting, its not clear to me this is correct POSIX
behavior in this case too ...

                                                                --jl


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Sun Jun 11 2000 - 02:13:12 EEST