Changeset 10661


Ignore:
Timestamp:
Sep 8, 2008, 3:30:27 PM (11 years ago)
Author:
gb
Message:

Don't use syscalls for futex control; use INT-ERRNO-FFCALL and new kernel imports.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-0/l0-misc.lisp

    r10452 r10661  
    3939  (defconstant futex-locked 1)
    4040  (defconstant futex-contended 2)
    41   (require "X8664-LINUX-SYSCALLS")
    4241  (declaim (inline %lock-futex %unlock-futex)))
    4342
     
    555554  (defun futex-wait (p val whostate)
    556555    (with-process-whostate (whostate)
    557       (syscall syscalls::futex p FUTEX-WAIT val (%null-ptr) (%null-ptr) 0)))
     556      (int-errno-ffcall
     557       (%kernel-import target::kernel-import-lisp-futex)
     558       :address p :int FUTEX-WAIT :int val :address (%null-ptr) :address (%null-ptr) :int 0 :int)))
    558559  #+monitor-futex-wait
    559560  (progn
     
    564565        (let* ((start (get-internal-real-time)))
    565566          (incf *total-futex-wait-calls*)
    566           (syscall syscalls::futex p FUTEX-WAIT val (%null-ptr) (%null-ptr) 0)
     567          (int-errno-ffcall
     568           (%kernel-import target::kernel-import-lisp-futex)
     569           :address p :int FUTEX-WAIT :int val :address (%null-ptr) :address (%null-ptr) :int 0 :int)
    567570          (incf *total-futex-wait-times* (- (get-internal-real-time) start)))))))
    568571   
     
    572575#+futex
    573576(defun futex-wake (p n)
    574   (syscall syscalls::futex p FUTEX-WAKE n (%null-ptr) (%null-ptr) 0))
     577  (int-errno-ffcall (%kernel-import target::kernel-import-lisp-futex)
     578                    :address p :int FUTEX-WAKE :int n :address (%null-ptr) :address (%null-ptr) :int 0 :int))
    575579
    576580#+futex
Note: See TracChangeset for help on using the changeset viewer.