lkml.org 
[lkml]   [2002]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRE: [PATCH] compatibility syscall layer (lets try again)
Linus Torvalds writes:

> Note that I've not committed the patch to my tree at all, and as far as I
> am concerned this is in somebody elses court (ie somebody that cares about
> restarting). I don't have any strong feelings either way about how
> restarting should work - and I'd like to have somebody take it up and
> testing it as well as having architecture maintainers largely sign off on
> this approach.

There is a simpler way to solve the nanosleep problem which doesn't
involve any more restart magic than we have been using for years.
That is to define a new sys_new_nanosleep system call which takes one
argument which is a pointer to the time to sleep. If the sleep gets
interrupted by a pending signal, the kernel sys_new_nanosleep will
write back the remaining time (overwriting the requested time) and
return -ERESTARTNOHAND. The glibc nanosleep() then looks like this:

int nanosleep(const struct timespec *req, struct timespec *rem)
{
*rem = *req;
return new_nanosleep(rem);
}

Any reason why this can't work?

(BTW this is Rusty's idea. :)

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

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