Linux PARISC architecture development
 help / color / mirror / Atom feed
* [parisc-linux] _syscall0() and gettid()
@ 2004-12-25  7:17 Mike Frysinger
  2004-12-26  9:26 ` Mike Frysinger
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Frysinger @ 2004-12-25  7:17 UTC (permalink / raw)
  To: parisc-linux

i was debugging a DirectFB build failure when i noticed that _syscall0() 
doesnt seem to be quite right ...

going by this little bit of code (see gettid(2) for info):
#include <sys/types.h>
#include <linux/unistd.h>
#include <errno.h>
_syscall0(pid_t,gettid)
pid_t gettid(void);
int main() { return 0; }

it fails to compile :(
gettid.c: In function `gettid':
gettid.c:5: error: parse error before ')' token

tried with gcc-3.3.5 and gcc-3.4.3 ...
using linux-2.6.8.1 headers here, but the define for _syscall0() doesnt seem 
to be different in 2.4 or 2.6 ... so what am i missing here ? :)
-mike
_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

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

* Re: [parisc-linux] _syscall0() and gettid()
  2004-12-25  7:17 [parisc-linux] _syscall0() and gettid() Mike Frysinger
@ 2004-12-26  9:26 ` Mike Frysinger
  2004-12-26 16:38   ` Matthew Wilcox
  0 siblings, 1 reply; 3+ messages in thread
From: Mike Frysinger @ 2004-12-26  9:26 UTC (permalink / raw)
  To: parisc-linux

On Saturday 25 December 2004 02:17 am, Mike Frysinger wrote:
> gettid.c: In function `gettid':
> gettid.c:5: error: parse error before ')' token

ok, the error is K_INLINE_SYSCALL in asm/unistd.h in the last if statement:

         __sys_res = (long)__res;                \
     }                               \
     if ( (unsigned long)__sys_res >= (unsigned long)-4095 ){    \
-        errno = -__sys_res);                     \
+        errno = -__sys_res;                     \
         __sys_res = -1;                     \
     }                               \
     __sys_res;                          \

that assignment to errno ... the parentheses is unbalanced ... i guess it 
could just be removed altogether :)
-mike
_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

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

* Re: [parisc-linux] _syscall0() and gettid()
  2004-12-26  9:26 ` Mike Frysinger
@ 2004-12-26 16:38   ` Matthew Wilcox
  0 siblings, 0 replies; 3+ messages in thread
From: Matthew Wilcox @ 2004-12-26 16:38 UTC (permalink / raw)
  To: Mike Frysinger; +Cc: parisc-linux

On Sun, Dec 26, 2004 at 04:26:09AM -0500, Mike Frysinger wrote:
> -        errno = -__sys_res);                     \
> +        errno = -__sys_res;                     \
> that assignment to errno ... the parentheses is unbalanced ... i guess it 
> could just be removed altogether :)

Checked in.  Thanks!

-- 
"Next the statesmen will invent cheap lies, putting the blame upon 
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince 
himself that the war is just, and will thank God for the better sleep 
he enjoys after this process of grotesque self-deception." -- Mark Twain
_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux

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

end of thread, other threads:[~2004-12-26 16:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-12-25  7:17 [parisc-linux] _syscall0() and gettid() Mike Frysinger
2004-12-26  9:26 ` Mike Frysinger
2004-12-26 16:38   ` Matthew Wilcox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox