mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Mosberger <davidm@napali.hpl.hp.com>
To: "Robert Williamson" <robbiew@us.ibm.com>
Cc: davidm@hpl.hp.com, Andi Kleen <ak@suse.de>,
	aniruddha.marathe@wipro.com, linux-kernel@vger.kernel.org,
	ltp-list@lists.sourceforge.net
Subject: Re: Same syscall is defined to different numbers on 3 different archs(was Re: Makefile  issue)
Date: Mon, 7 Apr 2003 11:49:52 -0700	[thread overview]
Message-ID: <16017.51280.497389.142672@napali.hpl.hp.com> (raw)
In-Reply-To: <OFE1A01154.21E41A43-ON85256D01.0063E065-86256D01.00646C2E@pok.ibm.com>

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

  reply	other threads:[~2003-04-07 18:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <OF51DE965A.FDCB6DBE-ON85256D01.005201B1-86256D01.005610CF@pok.ibm.com.suse.lists.linux.kernel>
2003-04-07 15:54 ` Andi Kleen
2003-04-07 16:26   ` Robert Williamson
2003-04-07 18:08     ` David Mosberger
2003-04-07 18:16       ` Robert Williamson
2003-04-07 18:49         ` David Mosberger [this message]
2003-04-08  2:23   ` Werner Almesberger
2003-04-08 13:30     ` [LTP] " Paul Larson
2003-04-08 19:47       ` Werner Almesberger
2003-04-07 15:39 Robert Williamson
2003-04-07 17:38 ` Robert Love

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16017.51280.497389.142672@napali.hpl.hp.com \
    --to=davidm@napali.hpl.hp.com \
    --cc=ak@suse.de \
    --cc=aniruddha.marathe@wipro.com \
    --cc=davidm@hpl.hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ltp-list@lists.sourceforge.net \
    --cc=robbiew@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®