Annotation of 43BSD/ucb/lisp/lisplib/syscall.l, revision 1.1.1.1

1.1       root        1: (setq rcs-syscall-
                      2:    "$Header: /usr/lib/lisp/RCS/syscall.l,v 1.2 83/01/30 11:52:43 jkf Exp $")
                      3: 
                      4: ;
                      5: ;   syscall
                      6: ;
                      7: ; This file contains macro definitions of some of the Unix system calls.
                      8: ; The documentation for these system calls can be found in the Unix
                      9: ; manual.
                     10: ;
                     11: ; It is believed that all of these system calls can be executed by the
                     12: ; Unix emulator Eunice under VMS.
                     13: ;
                     14: ; Unix system calls which return values in registers other than r0 cannot
                     15: ; be called in this way.  An example of this is fork, for which there is
                     16: ; a seperate lisp function.
                     17: 
                     18: (declare (macros t))
                     19: 
                     20: (defmacro sys_access (name mode)
                     21:   `(syscall 33 ,name ,mode))
                     22: 
                     23: (defmacro sys_alarm (secs)
                     24:   `(syscall 27 ,secs))
                     25: 
                     26: (defmacro sys_brk (addr)
                     27:   `(syscall 17 ,addr))
                     28: 
                     29: (defmacro sys_chdir (dir)
                     30:   `(syscall 12 ,dir))
                     31: 
                     32: (defmacro sys_chmod (name mode)
                     33:   `(syscall 15 ,name ,mode))
                     34: 
                     35: (defmacro sys_chown (name ownerid groupid)
                     36:   `(syscall 16 name ownerid groupid))
                     37: 
                     38: (defmacro sys_close (filedes)
                     39:   `(syscall 6 ,filedes))
                     40: 
                     41: (defmacro sys_creat (name mode)
                     42:   `(syscall 8 ,name ,mode))
                     43: 
                     44: (defmacro sys_exit (status)
                     45:   `(syscall 1 ,status))
                     46: 
                     47: (defmacro sys_getpid nil
                     48:   `(syscall 20))
                     49: 
                     50: (defmacro sys_getuid nil
                     51:   `(syscall 24))
                     52: 
                     53: (defmacro sys_getgid nil
                     54:   `(syscall 47))
                     55: 
                     56: ; sys_kill - need to get value into r0
                     57: (defmacro sys_kill (pid)
                     58:   `(syscall 37 ,pid))
                     59: 
                     60: 
                     61: (defmacro sys_link (name newname)
                     62:   `(syscall 9 ,name ,newname))
                     63: 
                     64: (defmacro sys_nice (value)
                     65:   `(syscall 34 ,value))
                     66: 
                     67: ; sys_lseek this may not be correct the explanation is given for a pdp-11
                     68: ; where certain values must be stored in two words.
                     69: ; also need to get value into r0
                     70: 
                     71: (defmacro sys_open (name how)  
                     72:   `(syscall 5 ,name ,how))
                     73: 
                     74: (defmacro sys_pause nil
                     75:   `(syscall 29))
                     76: 
                     77: (defmacro sys_setuid (uid)
                     78:   `(syscall 23 ,uid))
                     79: 
                     80: 
                     81: (defmacro sys_setgid (gid)
                     82:   `(syscall 46 ,gid))
                     83: 
                     84: (defmacro sys_sync nil
                     85:   `(syscall 36))
                     86: 
                     87: (defmacro sys_time nil
                     88:   `(syscall 13))
                     89: 
                     90: (defmacro sys_umask (complementmode)
                     91:   `(syscall 60 ,complementmode))
                     92: 
                     93: (defmacro sys_unlink (name)
                     94:   `(syscall 10 ,name))
                     95: 
                     96: (defmacro sys_wait nil
                     97:   `(syscall 7))
                     98: 
                     99: (defmacro sys_ioctl (portnumber arg)
                    100:   `(syscall 54 ,portnumber ,arg))
                    101: 
                    102: 
                    103: (putprop 'syscall t 'version)  ; flag that this file has been loaded

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.