linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* POSIX timer syscalls
@ 2003-03-06 23:06 David Mosberger
  2003-03-06 23:53 ` george anzinger
  2003-03-07  0:15 ` Ulrich Drepper
  0 siblings, 2 replies; 11+ messages in thread
From: David Mosberger @ 2003-03-06 23:06 UTC (permalink / raw)
  To: george; +Cc: linux-kernel, davidm

Syscall stubs must be declared to return "long", to ensure things work
properly on all 64-bit platforms (see earlier discussion on this
topic).  Patch below.

On a related note: as far as I can see, timer_t is declared as "int"
on all platforms (both by kernel and glibc).  Yet if my reading of the
kernel code is right, it's supposed to be "long" (and allegedly some
standard claims that timer_t should be the "widest" integer on a
platform).  But then again, I'm not familiar with the POSIX timer
interface myself, so perhaps I'm completely off base here.

	--david

diff -Nru a/kernel/posix-timers.c b/kernel/posix-timers.c
--- a/kernel/posix-timers.c	Thu Mar  6 14:59:46 2003
+++ b/kernel/posix-timers.c	Thu Mar  6 14:59:46 2003
@@ -423,7 +423,7 @@
 
 /* Create a POSIX.1b interval timer. */
 
-asmlinkage int
+asmlinkage long
 sys_timer_create(clockid_t which_clock,
 		 struct sigevent *timer_event_spec, timer_t * created_timer_id)
 {
@@ -663,7 +663,7 @@
 	}
 }
 /* Get the time remaining on a POSIX.1b interval timer. */
-asmlinkage int
+asmlinkage long
 sys_timer_gettime(timer_t timer_id, struct itimerspec *setting)
 {
 	struct k_itimer *timr;
@@ -695,7 +695,7 @@
 
  */
 
-asmlinkage int
+asmlinkage long
 sys_timer_getoverrun(timer_t timer_id)
 {
 	struct k_itimer *timr;
@@ -848,7 +848,7 @@
 }
 
 /* Set a POSIX.1b interval timer */
-asmlinkage int
+asmlinkage long
 sys_timer_settime(timer_t timer_id, int flags,
 		  const struct itimerspec *new_setting,
 		  struct itimerspec *old_setting)
@@ -922,7 +922,7 @@
 }
 
 /* Delete a POSIX.1b interval timer. */
-asmlinkage int
+asmlinkage long
 sys_timer_delete(timer_t timer_id)
 {
 	struct k_itimer *timer;
@@ -1054,7 +1054,7 @@
 	return -EINVAL;
 }
 
-asmlinkage int
+asmlinkage long
 sys_clock_settime(clockid_t which_clock, const struct timespec *tp)
 {
 	struct timespec new_tp;
@@ -1069,7 +1069,7 @@
 	new_tp.tv_nsec /= NSEC_PER_USEC;
 	return do_sys_settimeofday((struct timeval *) &new_tp, NULL);
 }
-asmlinkage int
+asmlinkage long
 sys_clock_gettime(clockid_t which_clock, struct timespec *tp)
 {
 	struct timespec rtn_tp;
@@ -1088,7 +1088,7 @@
 	return error;
 
 }
-asmlinkage int
+asmlinkage long
 sys_clock_getres(clockid_t which_clock, struct timespec *tp)
 {
 	struct timespec rtn_tp;

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

end of thread, other threads:[~2003-03-07 18:10 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-03-06 23:06 POSIX timer syscalls David Mosberger
2003-03-06 23:53 ` george anzinger
2003-03-07  1:27   ` David Mosberger
2003-03-07  1:39     ` george anzinger
2003-03-07  1:42       ` David Mosberger
2003-03-07  8:24         ` george anzinger
2003-03-07 10:09           ` Eric Piel
2003-03-07 12:14           ` Eric Piel
2003-03-07 18:16             ` george anzinger
2003-03-07 18:20             ` george anzinger
2003-03-07  0:15 ` Ulrich Drepper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).