lkml.org 
[lkml]   [2003]   [Apr]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: Same syscall is defined to different numbers on 3 different archs(was Re: Makefile issue)
>>>>> On Mon, 7 Apr 2003 13:16:21 -0500, "Robert Williamson" <robbiew@us.ibm.com> said:

Robert> The original note had the testcases in question, which uses
Robert> _syscall3......but since this was left off I'll summarize.
Robert> The author did use the following:

Robert> _syscall3 (int, timer_create, clockid_t, which_clock, struct sigevent *,
Robert> timer_event_spec, timer_t *, timer_id);

Robert> but compilation failed with:

Robert> timer_delete01.c: In function `timer_create':
Robert> timer_delete01.c:86: `__NR_timer_create' undeclared (first use in this
Robert> function)

Robert> The only way we were able to resolve this was to either to
Robert> add the kernel includes to the include path: "-I
Robert> /usr/src/linux-2.5.66/include". Obviously, this option will
Robert> not work for the LTP and our users who frequently change
Robert> kernel levels and install locations, we have to use "such
Robert> ugly, platform-dependent code"

But you still can use syscall() instead of the non-portable syscallN()
macros. Also, it should go something like this:

#include <sys/syscall.h>

#ifndef SYS_timer_create
# if defined(__i386)
# define SYS_timer_create 259
# elif defined(...)
...
# endif
#endif

--david
-
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:34    [W:0.034 / U:0.648 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site