Re: Linux-2.1.127 [alpha patch]

Mikolaj J. Habryn (dichro-fef51c23@eris.rcpt.to)
10 Nov 1998 16:57:40 +0800


>>>>> "LT" == Linus Torvalds <torvalds@transmeta.com> writes:

LT> Ok, after two fairly hectic weeks for me, 2.1.127 is finally
LT> out there.

The changes inside sys_select were not replicated in
osf_select. Looking at it, osf_select seems rather pointless, since it
behaves (or appears to be intended to) in exactly the same way as
sys_select, provided STICKY_TIMEOUTS is set for current. I suspect
that it might be very possible to force this inside the DU specific
exec code in search_binary_handler, and removing osf_select
altogether, but given that I can't get DU binaries to work here to
test it, I've left that (and extracting the DU code into a separate
binfmt module) for another day.

m.

--- linux/arch/alpha/kernel/osf_sys.c.orig Tue Nov 10 12:59:00 1998
+++ linux/arch/alpha/kernel/osf_sys.c Tue Nov 10 13:14:06 1998
@@ -178,6 +178,8 @@
#undef ROUND_UP
#undef NAME_OFFSET

+#define ROUND_UP(x,y) (((x)+(y)-1)/(y))
+
/*
* Alpha syscall convention has no problem returning negative
* values:
@@ -1133,10 +1135,10 @@
struct timeval32 *tvp)
{
fd_set_buffer *fds;
- unsigned long timeout;
+ long timeout;
int ret;

- timeout = ~0UL;
+ timeout = MAX_SCHEDULE_TIMEOUT;
if (tvp) {
time_t sec, usec;

@@ -1145,10 +1147,8 @@
|| (ret = __get_user(usec, &tvp->tv_usec)))
goto out_nofds;

- timeout = (usec + 1000000/HZ - 1) / (1000000/HZ);
- timeout += sec * HZ;
- if (timeout)
- timeout += jiffies + 1;
+ timeout = ROUND_UP(usec, 1000000/HZ);
+ timeout += sec * (unsigned long) HZ;
}

ret = -ENOMEM;
@@ -1168,7 +1168,7 @@
zero_fd_set(n, fds->res_out);
zero_fd_set(n, fds->res_ex);

- ret = do_select(n, fds, timeout);
+ ret = do_select(n, fds, &timeout);

/* OSF does not copy back the remaining time. */

-
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/