;;; which GC is disabled, so that Lisp doesn't move objects around
;;; that C is pointing to.
(sb!alien:define-alien-routine "breakpoint_install" sb!alien:unsigned-int
- (code-obj sb!alien:unsigned-long)
+ (code-obj sb!alien:unsigned)
(pc-offset sb!alien:int))
;;; This removes the break instruction and replaces the original
;;; instruction. You must call this in a context in which GC is disabled
;;; so Lisp doesn't move objects around that C is pointing to.
(sb!alien:define-alien-routine "breakpoint_remove" sb!alien:void
- (code-obj sb!alien:unsigned-long)
+ (code-obj sb!alien:unsigned)
(pc-offset sb!alien:int)
(old-inst sb!alien:unsigned-int))
(load-1-foreign))
(progn
- (define-alien-variable undefined-alien-address unsigned-long)
+ (define-alien-variable undefined-alien-address unsigned)
(defvar *runtime-dlhandle*))
(defvar *shared-objects*)
(error 'undefined-alien-function-error))
#!-win32
-(define-alien-variable current-memory-fault-address unsigned-long)
+(define-alien-variable current-memory-fault-address unsigned)
#!-win32
(defun memory-fault-error ()
(progn
(define-alien-type (struct page)
(struct page
- (start long)
+ (start signed)
;; On platforms with small enough GC pages, this field
;; will be a short. On platforms with larger ones, it'll
;; be an int.
(flags (unsigned 8))
(gen (signed 8))))
(declaim (inline find-page-index))
- (define-alien-routine "find_page_index" long (index long))
+ (define-alien-routine "find_page_index" long (index signed))
(define-alien-variable "page_table" (* (struct page))))
;;; Iterate over all the objects allocated in SPACE, calling FUN with
(sb!alien:define-alien-routine ("os_allocate" allocate-system-memory)
system-area-pointer
- (bytes sb!alien:unsigned-long))
+ (bytes sb!alien:unsigned))
(sb!alien:define-alien-routine ("os_deallocate" deallocate-system-memory)
sb!alien:void
(addr system-area-pointer)
- (bytes sb!alien:unsigned-long))
+ (bytes sb!alien:unsigned))
(define-alien-routine "kill_safely"
integer
- (os-thread #!-alpha unsigned-long #!+alpha unsigned-int)
+ (os-thread #!-alpha unsigned #!+alpha unsigned-int)
(signal int))
(define-alien-routine "wake_thread"
integer
- (os-thread #!-alpha unsigned-long #!+alpha unsigned-int))
+ (os-thread unsigned))
#!+sb-thread
(progn
;; that on Linux it's a pid, but it might not be on posix thread
;; implementations.
(define-alien-routine ("create_thread" %create-thread)
- unsigned-long (lisp-fun-address unsigned-long))
+ unsigned (lisp-fun-address unsigned))
(declaim (inline %block-deferrable-signals))
(define-alien-routine ("block_deferrable_signals" %block-deferrable-signals)
void
- (where sb!alien:unsigned-long)
- (old sb!alien:unsigned-long))
+ (where unsigned)
+ (old unsigned))
(defun block-deferrable-signals ()
(%block-deferrable-signals 0 0))
(progn
(declaim (inline futex-wait %futex-wait futex-wake))
- (define-alien-routine ("futex_wait" %futex-wait)
- int (word unsigned-long) (old-value unsigned-long)
- (to-sec long) (to-usec unsigned-long))
+ (define-alien-routine ("futex_wait" %futex-wait) int
+ (word unsigned) (old-value unsigned)
+ (to-sec long) (to-usec unsigned-long))
(defun futex-wait (word old to-sec to-usec)
(with-interrupts
(%futex-wait word old to-sec to-usec)))
(define-alien-routine "futex_wake"
- int (word unsigned-long) (n unsigned-long))))
+ int (word unsigned) (n unsigned-long))))
;;; used by debug-int.lisp to access interrupt contexts
#!-(or sb-fluid sb-thread) (declaim (inline sb!vm::current-thread-offset-sap))
;;; is not extreme enough, since it doesn't need to be blindingly
;;; fast: we can just implement those functions in C as a wrapper
;;; layer.
-(define-alien-type fd-mask unsigned-long)
+(define-alien-type fd-mask unsigned)
(define-alien-type nil
(struct fd-set
;;;; negligible.
(declaim (inline context-pc-addr))
-(define-alien-routine ("os_context_pc_addr" context-pc-addr) (* unsigned-long)
+(define-alien-routine ("os_context_pc_addr" context-pc-addr) (* unsigned)
;; (Note: Just as in CONTEXT-REGISTER-ADDR, we intentionally use an
;; 'unsigned *' interpretation for the 32-bit word passed to us by
;; the C code, even though the C code may think it's an 'int *'.)
(defun context-pc (context)
(declare (type (alien (* os-context-t)) context))
(let ((addr (context-pc-addr context)))
- (declare (type (alien (* unsigned-long)) addr))
+ (declare (type (alien (* unsigned)) addr))
(int-sap (deref addr))))
(declaim (inline context-register-addr))
(define-alien-routine ("os_context_register_addr" context-register-addr)
- (* unsigned-long)
+ (* unsigned)
;; (Note the mismatch here between the 'int *' value that the C code
;; may think it's giving us and the 'unsigned *' value that we
;; receive. It's intentional: the C header files may think of
(defun context-register (context index)
(declare (type (alien (* os-context-t)) context))
(let ((addr (context-register-addr context index)))
- (declare (type (alien (* unsigned-long)) addr))
+ (declare (type (alien (* unsigned)) addr))
(deref addr)))
(defun %set-context-register (context index new)
(declare (type (alien (* os-context-t)) context))
(let ((addr (context-register-addr context index)))
- (declare (type (alien (* unsigned-long)) addr))
+ (declare (type (alien (* unsigned)) addr))
(setf (deref addr) new)))
;;; This is like CONTEXT-REGISTER, but returns the value of a float
#!+gencgc
(without-gcing
(%make-lisp-obj
- (alien-funcall (extern-alien "alloc_code_object" (function unsigned-long unsigned unsigned))
+ (alien-funcall (extern-alien "alloc_code_object" (function unsigned unsigned unsigned))
boxed unboxed)))
#!-gencgc
(%primitive allocate-code-object boxed unboxed))