change to srfi-27 for random bits

This commit is contained in:
interp 2002-09-18 15:32:41 +00:00
parent ac880e4491
commit 911c56e668
2 changed files with 20 additions and 22 deletions

View File

@ -71,20 +71,20 @@
(plugin-utilities plugin-utilities-interface)) (plugin-utilities plugin-utilities-interface))
(open httpd-responses (open httpd-responses
httpd-request httpd-request
uri uri ;URI-PATH-LIST->PATH
tables ;hash-tables tables ;HASH-TABLES
define-record-types define-record-types ;DEFINE-RECORD-TYPE
rt-module-language ;get structures dynamically rt-module-language ;get structures dynamically
srfi-13 ; srfi-13 ;string
srfi-14 ;CHAR-SET:DIGIT srfi-14 ;CHAR-SET:DIGIT
handle-fatal-error handle-fatal-error ;WITH-FATAL-ERROR-HANDLER* et al.
random ;not quite random srfi-27 ;random numbers
locks locks ;MAKE-LOCK et al.
thread-cells thread-cells ;THREAD-CELL et al.
profiling profiling ;PROFILE-SPACE
httpd-logging httpd-logging ;HTTP-SYSLOG
shift-reset shift-reset ;SHIFT and RESET
scsh scsh ;regexp et al.
scheme scheme
) )
(files servlet-handler)) (files servlet-handler))
@ -149,6 +149,7 @@
spatial spatial
srfi-13 srfi-13
srfi-1 srfi-1
locks
scsh scsh
scheme) scheme)
(files profile)) (files profile))

View File

@ -2,14 +2,6 @@
;; Copyright Andreas Bernauer, 2002 ;; Copyright Andreas Bernauer, 2002
;(define-record-type continuation-table-entry :continuation-table-entry
; (make-continuation-table-entry continuation)
; continuation-table-entry?
; (id continuation-table-entry-id set-continuation-table-entry-id!)
; (continuation continuation-table-entry-continuation
; set-continuation-table-entry-continuation!))
;;; instance-table: entry for every new request on a servlet page ;;; instance-table: entry for every new request on a servlet page
(define-record-type instance :instance (define-record-type instance :instance
(make-instance servlet-name continuation-table) (make-instance servlet-name continuation-table)
@ -29,8 +21,13 @@
;; FIXME: Make this thread-safe ;; FIXME: Make this thread-safe
(define *instance-table* (make-integer-table)) ; instance-id is index (define *instance-table* (make-integer-table)) ; instance-id is index
(define random (make-random (modulo (time)268435455))) ; not really random (define random
; generator (let* ((source (make-random-source))
(random-integer (begin
(random-source-randomize! source)
(random-source-make-integers source))))
(lambda ()
(random-integer 1073741824)))) ; I hope, 1+ billion is enough....
(define (servlet-handler servlet-path) (define (servlet-handler servlet-path)
(lambda (path req) (lambda (path req)