~mysql/mysql-server/mysql-6.0

« back to all changes in this revision

Viewing changes to mit-pthreads/machdep/syscall-template-sparc-sunos4.S

  • Committer: bk at mysql
  • Date: 2000-07-31 19:29:14 UTC
  • Revision ID: sp1r-bk@work.mysql.com-20000731192914-08846
Import changeset

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* ==== syscall.S ============================================================
 
2
 * Copyright (c) 1994 Chris Provenzano, proven@mit.edu
 
3
 * All rights reserved.
 
4
 *
 
5
 */
 
6
 
 
7
#include <sys/syscall.h>
 
8
 
 
9
#define SYSCALL(x)                                              \
 
10
        .globl _machdep_sys_##x;                        \
 
11
                                                                                \
 
12
_machdep_sys_##x:;                                              \
 
13
                                                                                \
 
14
        mov SYS_##x, %g1;                               \
 
15
        ta 0;                                                           \
 
16
        bcs,a 2b;                                                       \
 
17
        sub %r0,%o0,%o0;                                        \
 
18
        retl;                                                           \
 
19
        nop
 
20
 
 
21
/*
 
22
 * Initial asm stuff for all functions.
 
23
 */
 
24
        .text
 
25
        .align  4
 
26
 
 
27
/* ==========================================================================
 
28
 * error code for all syscalls. The error value is returned as the negative
 
29
 * of the errno value.
 
30
 */
 
31
 
 
32
1:
 
33
        sub             %r0, %o0, %o0
 
34
2:
 
35
        retl
 
36
        nop
 
37
 
 
38
#define XSYSCALL(NAME) SYSCALL(NAME)
 
39
 
 
40
XSYSCALL(SYSCALL_NAME)