support for the latest changes: low-interrupt and co, cwd and env per thread
This commit is contained in:
		
							parent
							
								
									8c4d87dde6
								
							
						
					
					
						commit
						0d871d4784
					
				| 
						 | 
				
			
			@ -315,6 +315,7 @@
 | 
			
		|||
	  pid->proc
 | 
			
		||||
 | 
			
		||||
	  autoreap-policy
 | 
			
		||||
	  install-autoreaping
 | 
			
		||||
	  reap-zombies
 | 
			
		||||
	  
 | 
			
		||||
	  wait
 | 
			
		||||
| 
						 | 
				
			
			@ -340,10 +341,14 @@
 | 
			
		|||
	  with-umask*
 | 
			
		||||
	  (with-umask :syntax)
 | 
			
		||||
 | 
			
		||||
	  process-chdir
 | 
			
		||||
	  process-cwd
 | 
			
		||||
	  chdir
 | 
			
		||||
	  cwd
 | 
			
		||||
	  with-cwd*
 | 
			
		||||
	  (with-cwd :syntax)
 | 
			
		||||
	  with-cwd-aligned*
 | 
			
		||||
	  (with-cwd-aligned :syntax)
 | 
			
		||||
 | 
			
		||||
	  pid
 | 
			
		||||
	  parent-pid
 | 
			
		||||
| 
						 | 
				
			
			@ -401,7 +406,8 @@
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
(define-interface scsh-environment-interface
 | 
			
		||||
  (export setenv
 | 
			
		||||
  (export install-env
 | 
			
		||||
	  setenv
 | 
			
		||||
	  getenv
 | 
			
		||||
	  env->alist
 | 
			
		||||
	  alist->env
 | 
			
		||||
| 
						 | 
				
			
			@ -1060,8 +1066,7 @@
 | 
			
		|||
	  interrupt-set
 | 
			
		||||
 | 
			
		||||
	  interrupt-handlers-vector  ; JMG: replaces vm vector
 | 
			
		||||
	  init-scsh-signal
 | 
			
		||||
	  procobj-handler
 | 
			
		||||
	  %install-scsh-handlers
 | 
			
		||||
 | 
			
		||||
	  (with-enabled-interrupts :syntax)
 | 
			
		||||
	  with-enabled-interrupts*
 | 
			
		||||
| 
						 | 
				
			
			@ -1074,6 +1079,7 @@
 | 
			
		|||
	  %set-unix-signal-handler
 | 
			
		||||
	  %unix-signal-handler
 | 
			
		||||
 | 
			
		||||
	  ;; reexported from low-interrupt
 | 
			
		||||
	  interrupt/alrm interrupt/alarm
 | 
			
		||||
	  interrupt/int  interrupt/keyboard
 | 
			
		||||
;	  interrupt/memory-shortage
 | 
			
		||||
| 
						 | 
				
			
			@ -1110,4 +1116,32 @@
 | 
			
		|||
	  nonblockwait-interrupt
 | 
			
		||||
	  nonblockwait-interrupt-set
 | 
			
		||||
	  
 | 
			
		||||
	  install-event-handlers!))
 | 
			
		||||
	  install-event-handlers!))
 | 
			
		||||
 | 
			
		||||
(define-interface low-interrupt-interface
 | 
			
		||||
  (export low-interrupt-register
 | 
			
		||||
	  init-low-interrupt
 | 
			
		||||
	  number-of-interrupts
 | 
			
		||||
          interrupt/alrm interrupt/alarm
 | 
			
		||||
	  interrupt/int  interrupt/keyboard
 | 
			
		||||
;	  interrupt/memory-shortage
 | 
			
		||||
	  interrupt/post-gc
 | 
			
		||||
	  interrupt/i/o-completion
 | 
			
		||||
	  interrupt/chld
 | 
			
		||||
	  interrupt/cont
 | 
			
		||||
	  interrupt/hup	
 | 
			
		||||
	  interrupt/quit	
 | 
			
		||||
	  interrupt/term	
 | 
			
		||||
	  interrupt/tstp	
 | 
			
		||||
	  interrupt/usr1	
 | 
			
		||||
	  interrupt/usr2	
 | 
			
		||||
	  interrupt/info
 | 
			
		||||
	  interrupt/io	
 | 
			
		||||
	  interrupt/poll	
 | 
			
		||||
	  interrupt/prof	
 | 
			
		||||
	  interrupt/pwr	
 | 
			
		||||
	  interrupt/urg	
 | 
			
		||||
	  interrupt/vtalrm
 | 
			
		||||
	  interrupt/winch
 | 
			
		||||
	  interrupt/xcpu	
 | 
			
		||||
	  interrupt/xfsz))
 | 
			
		||||
| 
						 | 
				
			
			@ -95,11 +95,6 @@
 | 
			
		|||
	  $current-noise-port)
 | 
			
		||||
  (open ports i/o))
 | 
			
		||||
 | 
			
		||||
(define-structure signal-handler signal-handler-interface
 | 
			
		||||
  (open scheme
 | 
			
		||||
	scsh
 | 
			
		||||
	scsh-level-0)
 | 
			
		||||
  (files (scsh sighandlers)))
 | 
			
		||||
;;; The scsh-level-0 package is for implementation convenience.
 | 
			
		||||
;;; The scsh startup and top-level modules need access to scsh
 | 
			
		||||
;;; procedures, but they export procedures that are themselves
 | 
			
		||||
| 
						 | 
				
			
			@ -146,6 +141,7 @@
 | 
			
		|||
;   (scsh-regexp-package scsh-regexp-interface)
 | 
			
		||||
)
 | 
			
		||||
  (for-syntax (open scsh-syntax-helpers scheme))
 | 
			
		||||
  (access events)
 | 
			
		||||
  (open enumerated
 | 
			
		||||
	external-calls           ;JMG new FFI
 | 
			
		||||
	structure-refs
 | 
			
		||||
| 
						 | 
				
			
			@ -180,7 +176,6 @@
 | 
			
		|||
	let-opt			; optional-arg parsing & defaulting
 | 
			
		||||
	
 | 
			
		||||
	architecture     ; Was this by JMG ??
 | 
			
		||||
	interrupts	; signal handler code
 | 
			
		||||
 | 
			
		||||
	re-level-0
 | 
			
		||||
	rx-syntax
 | 
			
		||||
| 
						 | 
				
			
			@ -191,20 +186,22 @@
 | 
			
		|||
 | 
			
		||||
	scheme
 | 
			
		||||
	
 | 
			
		||||
	
 | 
			
		||||
	low-interrupt            ; for sighandler and procobj
 | 
			
		||||
	i/o                  ; all these seem to be for scsh-0.6 JMG
 | 
			
		||||
	i/o-internal
 | 
			
		||||
	channels channel-i/o
 | 
			
		||||
	low-channels
 | 
			
		||||
	code-vectors
 | 
			
		||||
	byte-vectors
 | 
			
		||||
	threads threads-internal locks placeholders
 | 
			
		||||
	primitives
 | 
			
		||||
	escapes
 | 
			
		||||
	command-levels
 | 
			
		||||
	features
 | 
			
		||||
	general-tables)
 | 
			
		||||
	general-tables
 | 
			
		||||
	simple-syntax)  
 | 
			
		||||
  (for-syntax (open scsh-syntax-helpers scheme))
 | 
			
		||||
  (access command-processor
 | 
			
		||||
  (access interrupts
 | 
			
		||||
	  command-processor
 | 
			
		||||
	  escapes
 | 
			
		||||
	  i/o		; S48's force-output
 | 
			
		||||
	  formats
 | 
			
		||||
| 
						 | 
				
			
			@ -292,7 +289,8 @@
 | 
			
		|||
	evaluation
 | 
			
		||||
	extended-ports
 | 
			
		||||
	interfaces
 | 
			
		||||
 | 
			
		||||
	events                     
 | 
			
		||||
	low-interrupt
 | 
			
		||||
	fluids-internal            ; JMG: get-dynamic-env 
 | 
			
		||||
	handle                     ; JMG: with-handler
 | 
			
		||||
;	package-commands
 | 
			
		||||
| 
						 | 
				
			
			@ -401,9 +399,25 @@
 | 
			
		|||
	placeholders
 | 
			
		||||
	architecture
 | 
			
		||||
	scheme
 | 
			
		||||
	interrupts)
 | 
			
		||||
	low-interrupt)
 | 
			
		||||
  (files event))
 | 
			
		||||
 | 
			
		||||
(define-structure simple-syntax (export define-simple-syntax)
 | 
			
		||||
  (open scheme)
 | 
			
		||||
 (begin (define-syntax define-simple-syntax
 | 
			
		||||
	  (syntax-rules ()
 | 
			
		||||
			((define-simple-syntax (name . pattern) result)
 | 
			
		||||
			 (define-syntax name (syntax-rules () ((name . pattern) result))))))))
 | 
			
		||||
	
 | 
			
		||||
 | 
			
		||||
(define-structure low-interrupt low-interrupt-interface
 | 
			
		||||
  (open enumerated
 | 
			
		||||
	locks
 | 
			
		||||
	error-package
 | 
			
		||||
	interrupts	; signal handler code
 | 
			
		||||
	scheme)
 | 
			
		||||
  (files low-interrupt))
 | 
			
		||||
 | 
			
		||||
;(define-structure test-package (export test-proc)
 | 
			
		||||
;  (open scsh-regexp-package scheme)
 | 
			
		||||
;  (begin (define (test-proc p)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue