(index ("synch" 0) ("synch-with" 183) ("call-synch" 457) ("call-synch-with" 727) ("apply-synch" 1036) ("apply-synch-with" 1308) ("synch-lock" 1620) ("synch-unlock" 1837) ("let-synch-with" 2177) ("set!-synch-with" 2580) ("record-synch" 2965) ("record-synch-lock" 3494) ("record-synch-unlock" 3861) ("%call-synch" 4351) ("%call-synch-with" 4447) ("%apply-synch" 4553) ("%apply-synch-with" 4651) ("%synch" 4759) ("%synch-with" 4830) ("%synch-lock" 4920) ("%synch-unlock" 5001) ("%let-synch" 5086) ("%set!-synch-with" 5163) ("%object-synch-cut-with" 5263) ("%record-synch" 5366) ("%record-synch-lock" 5468) ("%record-synch-unlock" 5580) ("make-synch-with-object" 5696) ("synch-with-object?" 6216) ("define-constructor-synch" 6541) ("define-predicate-synch" 6847) ("define-operation-synch" 7073) ("define-operation-%synch" 7552) ("synchronized-procedure" 7718))
(def (sig (syntax "(synch MUTEX-FORM [BODY ...]) -> *" (id synch))) (p "Execute " (tt "BODY ...") " while " (tt "MUTEX") " locked.") (p "Returns the result of " (tt "BODY ...") "."))
(def (sig (syntax "(synch-with MUTEX-FORM VARIABLE [BODY ...]) -> *" (id synch-with))) (p "Execute " (tt "BODY ...") " while " (tt "MUTEX") " locked and the mutex-specific of " (tt "MUTEX") " bound to " (tt "VARIABLE") ".") (p "Returns the result of " (tt "BODY ...") "."))
(def (sig (syntax "(call-synch MUTEX-FORM PROCEDURE [ARGUMENTS ...]) -> *" (id call-synch))) (p "Invoke " (tt "PROCEDURE") " on the argument list " (tt "ARGUMENTS ...") " while " (tt "MUTEX") " locked.") (p "Returns the result of the " (tt "PROCEDURE") " invocation."))
(def (sig (syntax "(call-synch-with MUTEX-FORM PROCEDURE [ARGUMENTS ...]) -> *" (id call-synch-with))) (p "Invoke " (tt "PROCEDURE") " on the mutex-specific of " (tt "MUTEX") " and the " (tt "ARGUMENTS ...") " while " (tt "MUTEX") " locked.") (p "Returns the result of the " (tt "PROCEDURE") " invocation."))
(def (sig (syntax "(apply-synch MUTEX-FORM PROCEDURE [ARGUMENTS ...]) -> *" (id apply-synch))) (p "Apply " (tt "PROCEDURE") " to the argument list " (tt "ARGUMENTS ...") " while " (tt "MUTEX") " locked.") (p "Returns the result of the " (tt "PROCEDURE") " application."))
(def (sig (syntax "(apply-synch-with MUTEX-FORM PROCEDURE [ARGUMENTS ...]) -> *" (id apply-synch-with))) (p "Apply " (tt "PROCEDURE") " to the mutex-specific of " (tt "MUTEX") ") and the " (tt "ARGUMENTS ...") " while " (tt "MUTEX") " locked.") (p "Returns the result of the " (tt "PROCEDURE") " application."))
(def (sig (syntax "(synch-lock MUTEX-FORM [BODY ...]) -> *" (id synch-lock))) (p "Execute " (tt "BODY ...") " while " (tt "MUTEX") " locked, and leave mutex locked.") (p "Returns the result of " (tt "BODY ...") "."))
(def (sig (syntax "(synch-unlock MUTEX-FORM [BODY ...]) -> *" (id synch-unlock))) (p "Execute " (tt "BODY ...") " while " (tt "MUTEX") " locked, and leave mutex unlocked.") (p "Returns the result of " (tt "BODY ...") ".") (p "Should the mutex be unlocked a warning is issued and the mutex is locked before executing the " (tt "BODY") "."))
(def (sig (syntax "(let-synch-with BINDINGS [BODY ...]) -> *" (id let-synch-with))) (p (tt "BINDINGS") " is a list of " (tt "(VARIABLE MUTEX-FORM)") ".") (p "Expands into a nested " (tt "(synch-with MUTEX-FORM VARIABLE ...") " form, a " (b (tt "synch-with")) " for each binding pair in " (tt "BINDINGS") ". The leftmost binding pair is the outermost.") (p "Returns the result of " (tt "BODY ...") "."))
(def (sig (syntax "(set!-synch-with MUTEX-FORM VARIABLE [BODY ...]) -> *" (id set!-synch-with))) (p "While the " (tt "MUTEX") " is locked, evaluates " (tt "BODY ...") " with the " (tt "VARIABLE") " bound to the mutex-specific of " (tt "MUTEX") ". Sets the mutex-specific of " (tt "MUTEX") " to the result of the evaluation.") (p "Returns the new mutex-specific of " (tt "MUTEX") "."))
(def (sig (syntax "(record-synch RECORD-OBJECT RECORD-SYMBOL [BODY ...]) -> *" (id record-synch))) (p "Execute " (tt "BODY ...") " while the " (tt "RECORD-OBJECT") " mutex is locked. The mutex is a field of the record named " (tt "RECORD-SYMBOL-mutex") ".") (p "Returns the result of " (tt "BODY ...") ".") (highlight scheme "(define-record-type foo\n  (make-foo a b mtx)\n  foo?\n  (a foo-a)\n  (b foo-b)\n  (mtx foo-mutex) )\n\n(define f1 (make-foo 1 2 (make-mutex 'foo)))\n\n(record-synch foo f1 (+ (foo-a f1) (foo-b f1)))"))
(def (sig (syntax "(record-synch-lock RECORD-OBJECT RECORD-SYMBOL [BODY ...]) -> *" (id record-synch-lock))) (p "Execute " (tt "BODY ...") " while the " (tt "RECORD-OBJECT") " mutex is locked, and leave the mutex locked.") (p "Returns the result of " (tt "BODY ...") ".") (p (tt "RECORD-SYMBOL") " and " (tt "RECORD-OBJECT") " are per " (b (tt "record-synch")) "."))
(def (sig (syntax "(record-synch-unlock RECORD-OBJECT RECORD-SYMBOL [BODY ...]) -> *" (id record-synch-unlock))) (p "Execute " (tt "BODY ...") " while the " (tt "RECORD-OBJECT") " mutex is locked, and leave the mutex unlocked.") (p "Returns the result of " (tt "BODY ...") ".") (p (tt "RECORD-SYMBOL") " and " (tt "RECORD-OBJECT") " are per " (b (tt "record-synch")) ".") (p "Should the mutex be unlocked a warning is issued and the mutex is locked before executing the " (tt "BODY") "."))
(def (sig (syntax "(%call-synch MUTEX-FORM PROCEDURE [ARGUMENTS ...]) -> *" (id %call-synch))))
(def (sig (syntax "(%call-synch-with MUTEX-FORM PROCEDURE [ARGUMENTS ...]) -> *" (id %call-synch-with))))
(def (sig (syntax "(%apply-synch MUTEX-FORM PROCEDURE [ARGUMENTS ...]) -> *" (id %apply-synch))))
(def (sig (syntax "(%apply-synch-with MUTEX-FORM PROCEDURE [ARGUMENTS ...]) -> *" (id %apply-synch-with))))
(def (sig (syntax "(%synch MUTEX-FORM [BODY ...]) -> *" (id %synch))))
(def (sig (syntax "(%synch-with MUTEX-FORM VARIABLE [BODY ...]) -> *" (id %synch-with))))
(def (sig (syntax "(%synch-lock MUTEX-FORM [BODY ...]) -> *" (id %synch-lock))))
(def (sig (syntax "(%synch-unlock MUTEX-FORM [BODY ...]) -> *" (id %synch-unlock))))
(def (sig (syntax "(%let-synch BINDINGS [BODY ...]) -> *" (id %let-synch))))
(def (sig (syntax "(%set!-synch-with MUTEX-FORM VARIABLE [BODY ...]) -> *" (id %set!-synch-with))))
(def (sig (syntax "(%object-synch-cut-with MUTEX-FORM [BODY ...]) -> *" (id %object-synch-cut-with))))
(def (sig (syntax "(%record-synch RECORD-OBJECT RECORD-SYMBOL [BODY ...]) -> *" (id %record-synch))))
(def (sig (syntax "(%record-synch-lock RECORD-OBJECT RECORD-SYMBOL [BODY ...]) -> *" (id %record-synch-lock))))
(def (sig (syntax "(%record-synch-unlock RECORD-OBJECT RECORD-SYMBOL [BODY ...]) -> *" (id %record-synch-unlock))))
(def (sig (procedure "(make-synch-with-object OBJECT [NAME]) -> mutex" (id make-synch-with-object))) (p "Returns a mutex with a mutex-specific value of " (tt "OBJECT") ", and optional mutex " (tt "NAME") ".") (p (tt "NAME") " is either a symbol or a one element list of symbol. When a list the first element is used as the basis for a generated symbol. When a symbol it is used literally as the mutex name.") (p "When " (tt "NAME") " is missing a generated symbol with the prefix " (b (tt "synchobj")) " is provided."))
(def (sig (procedure "(synch-with-object? OBJECT [PREDICATE]) -> bool" (id synch-with-object?))) (p "Is the " (tt "OBJECT") " a synchronized object - a mutex with a non-void mutex specific?") (p "The optional " (tt "PREDICATE") " is used to verify the type of the mutex-specific binding. Otherwise any object is accepted."))
(def (sig (syntax "(define-constructor-synch CTORNAME [ID])" (id define-constructor-synch))) (highlight scheme "(define-constructor-synch make-hash-table hash-table-synch)\n;=> similar\n(define (make-hash-table-sync . args)\n  (make-synch-with-object (apply make-hash-table args) '(hash-table-synch)) )"))
(def (sig (syntax "(define-predicate-synch PREDNAME)" (id define-predicate-synch))) (highlight scheme "(define-predicate-synch hash-table?)\n;=> similar\n(define (hash-table?-sync obj) (synch-with-object? obj hash-table?))"))
(def (sig (syntax "(define-operation-synch OPERNAME)" (id define-operation-synch))) (p "Note that the operand must be the first argument of " (tt "OPERNAME") ".") (highlight scheme "(define-operation-synch hash-table-set!)\n;=> similar\n(define (hash-table-set!-sync mtx+obj . args)\n  (let ((mtx (if (pair? mtx+obj) (car mtx+obj) mtx+obj)))\n    (check-mutex+object 'hash-table-set!-synch mtx 'object-synch)\n    (synch-with mtx+obj obj (apply hash-table-set! obj args)) ) )"))
(def (sig (syntax "(define-operation-%synch OPERNAME)" (id define-operation-%synch))) (p "Note that the operand must be the first argument of " (tt "OPERNAME") "."))
(def (sig (procedure "(synchronized-procedure PROC) -> procedure" (id synchronized-procedure))) (p "Returns a synchronized version of " (tt "PROC")))
