lkml.org 
[lkml]   [1999]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: kernel thread support - LWP's
On 18 Jul 1999, Ulrich Drepper wrote:

> Alon Ziv <alonz@cs.technion.ac.il> writes:
>
> > If we use the trampoline approach, we get:
> >
> > Original thread:
> > - allocate new stack
> > - new_tid = clone(...)
> > - waitpid(new_tid, WUNTRACED)
> > - (update thread tables &c)
> > - kill(new_tid, SIGCONT)
> > New thread:
> > - sched_setscheduler(new_tid, ...)
> > - kill (new_tid, SIGSTOP)
>
> Even worse. Since the manager has to know when the
> schedparam/scheduler calls fail it the child must communicate this
> somehow to the manager. And this is absolutely unnecessary since the
> manager could make the calls itself.
>
No, in this case the new thread will just put the error code in its own
per-thread header and do an exit(-1) instead of the kill. Same overhead.

-az

------------------------+----------------------------------------------------
. __ | Phone: +972 3 5340753 (home), +972 3 9685882 (work)
_| / | email: alonz@usa.net
/ | /_ Alon Ziv | smail: 33 Ha-Rama St., Ganey Tiqwah 55900, Israel
------------------------+----------------------------------------------------
<<<(((this place reserved for that ultra-wise oneliner I haven't found.)))>>>


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.083 / U:22.580 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site