home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.lisp
- Path: sparky!uunet!mcsun!sunic!aun.uninett.no!nuug!dhhalden.no!fenris.dhhalden.no!eskilb
- From: eskilb@dhhalden.no (Eskil Brun)
- Subject: Re: Sun Common Lisp & Foreign functions
- Message-ID: <eskilb.716241360@fenris.dhhalden.no>
- Keywords: foreign functions
- Organization: Ostfold College
- References: <1992Sep10.122629.8200@cs.joensuu.fi>
- Date: Fri, 11 Sep 1992 19:56:00 GMT
- Lines: 41
-
- Hi,
-
- like barmar explains, this has to do with the Lucid scheduler.
- it probably uses alarm(2) to generate SIGALRMs every *scheduling-quantum*.
-
- i've been struggling with this myself for a while until i discovered
- the wizard-function (undocumented and unsupported) SYS::WITH-SIGNAL-MASK.
-
- e.g.:
-
- (defparameter SIGALRM 14)
- ;;; doffen(bash)$ man 5 signal
- ;;; SIGALRM 14 A alarm clock; see alarm(2)
-
- (defparameter SIGALRM-MASK (expt 2 (1- SIGALRM)))
-
- ...
- ;; Mask away Lisp scheduler interrupts while executing the body of
- ;; this code. It is a kind of Lispm WITHOUT-INTERRUPTS, but bypasses
- ;; the scheduler logics altogether.
- (sys::with-signal-mask (logior SIGALRM-MASK (sys::get-signal-mask))
- ;;; Note that this doesn't work:
- ;;; > (sys::with-interrupts-deferred
- ;;; (list (setq acceptsock
- ;;; (std-c-library::accept sock acceptsockaddr sixteen))
- ;;; (enlib:sys-errlist)))
- ;;; (-1 "Interrupted system call")
- (let* ((send-chunk-len 512)
- (str-len (length str))
- ...
-
- Cheers,
- Eyvind. (Not Eskil ;-)
-
- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
- Eyvind Ness Internet Email: Eyvind.Ness@HRP.No
- Research Scientist Phone: +47 9 183100
- Control Room Systems Division Fax: +47 9 187109
- OECD Halden Reactor Project Snail Mail: P.O. Box 173, N-1751 Halden
- Norway
- +=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
-