mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* On thread scheduling
@ 2007-09-14 22:40 Heikki Orsila
  2007-09-15  5:39 ` Matthias Kaehlcke
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Heikki Orsila @ 2007-09-14 22:40 UTC (permalink / raw)
  To: Linux Kernel Mailing List

Consider a simple embedded system:

void interrupt_handler(void)
{
	...
}

int main(void)
{
	...
}

I would like to "emulate" this system with a workstation to make 
development faster. I would create two threads, one executing the 
main() function, and the other occasionally calling interrupt_handler(). 
Before interrupt_handler() is called, the main() thread should be 
stopped asynchronously.

I looked into pthreads documentation and found only pthread_kill(thread, 
SIGTSTP) to do asynchronous stop, but then I also have to play terminal 
tricks to avoid problems..

Is there are function to just disable scheduling of a single thread 
without having other side-effects (such as terminal stuff)? Functions 
like pthread_disable_scheduling(thread) and 
pthread_enable_scheduling(thread) would be good for this..

-- 
Heikki Orsila			Barbie's law:
heikki.orsila@iki.fi		"Math is hard, let's go shopping!"
http://www.iki.fi/shd

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-09-16  7:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-14 22:40 On thread scheduling Heikki Orsila
2007-09-15  5:39 ` Matthias Kaehlcke
2007-09-15 14:54 ` Ray Lee
2007-09-16  7:16 ` Kyle Moffett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®