lkml.org 
[lkml]   [1999]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Final(?) Patch : CLONE_PPID, CLONE_WAIT, CLONE_SUSPENDED
From
Date
thockin@isunix.it.ilstu.edu (Tim Hockin) writes:

[some review]


> +#define SYS_WAIT4_SEARCH(start_task) \
> + for (p = (start_task); p ; p = p->p_osptr) { \

[... 100+ lines macro deleted ...]

Any reason why you don't use a subroutine for that? It would be prettier
and most likely faster (because of the decreased L1 instruction cache
requirements)

> + if (clone_flags & CLONE_PPIDOK)
> + new_flags |= PF_PPIDOK;
> + if (clone_flags & CLONE_WAIT)
> + new_flags |= PF_CLWAIT;
> +


PF_* are only used internally, so you can without make PF_* match CLONE_*
and use

new_flags |= (clone_flags & (CLONE_PPIDOK|CLONE_WAIT));

> + if (!(clone_flags & CLONE_SUSPENDED))
> + wake_up_process(p); /* do this last */
> + else
> + p->state = TASK_STOPPED;

I still think this is unnecessary...


-Andi
--
This is like TV. I don't like TV.

-
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.038 / U:0.040 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site