Changeset 34903 in project
- Timestamp:
- 11/22/17 21:02:01 (3 years ago)
- Location:
- wiki/man/5
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
wiki/man/5/Module (chicken platform)
r34261 r34903 183 183 184 184 185 === Returning to the host program 186 187 === return-to-host 188 189 <procedure>(return-to-host)</procedure> 190 191 Exits the Scheme code and returns to the invoking context that called 192 {{CHICKEN_run}} or {{CHICKEN_continue}}. 193 194 After {{return-to-host}} has been executed and once {{CHICKEN_run}} 195 returns, you can invoke callbacks which have been defined with 196 {{define-external}}. 197 198 185 199 --- 186 200 Previous: [[Module (chicken pathname)]] -
wiki/man/5/TODO/Embedding
r34052 r34903 56 56 {{toplevel}} is the toplevel entry-point procedure, you usually pass {{C_toplevel}} here. 57 57 The result value is the continuation that can be used to re-invoke the Scheme code from the 58 point after it called {{return-to-host}} (see below).58 point after it called [[Module (chicken gc)#return-to-host|{{return-to-host}}]]. 59 59 60 60 If you just need a Scheme interpreter, you can also pass {{CHICKEN_default_toplevel}} as … … 66 66 67 67 === return-to-host 68 69 TODO: This has been documented under (chicken platform) 70 71 The {{eval}} library unit also provides boilerplate callbacks, that 72 simplify invoking Scheme code embedded in a C or C++ application: 68 73 69 74 <procedure>(return-to-host)</procedure> … … 161 166 % cat x.scm 162 167 ;;; x.scm 168 (import (chicken platform)) 163 169 164 170 (define (bar x) (gc) (* x x)) … … 235 241 236 242 % cat x.scm 237 ( require-extension srfi-18)243 (import (chicken platform) srfi-18) ;; Needs the srfi-18 egg 238 244 239 245 (define m (make-mutex))
Note: See TracChangeset
for help on using the changeset viewer.