Artifact d4df4764d88b90ac4e528d5ae6ed82b6a02d0b34:


0000: 54 68 69 73 20 64 69 72 65 63 74 6f 72 79 20 63  This directory c
0010: 6f 6e 74 61 69 6e 73 20 61 20 72 65 65 6e 74 72  ontains a reentr
0020: 61 6e 74 20 76 65 72 73 69 6f 6e 20 6f 66 20 74  ant version of t
0030: 68 65 20 74 72 61 6d 70 6f 6c 69 6e 65 20 70 61  he trampoline pa
0040: 63 6b 61 67 65 2e 0a 0a 49 6e 73 74 65 61 64 20  ckage...Instead 
0050: 6f 66 20 63 6c 6f 62 62 65 72 69 6e 67 20 61 20  of clobbering a 
0060: 67 6c 6f 62 61 6c 20 76 61 72 69 61 62 6c 65 2c  global variable,
0070: 20 61 20 70 6f 69 6e 74 65 72 20 74 6f 20 64 61   a pointer to da
0080: 74 61 30 2c 64 61 74 61 31 2c 2e 2e 2e 0a 69 73  ta0,data1,....is
0090: 20 70 61 73 73 65 64 20 74 6f 20 74 68 65 20 63   passed to the c
00a0: 61 6c 6c 65 64 20 66 75 6e 63 74 69 6f 6e 20 69  alled function i
00b0: 6e 20 61 20 73 70 65 63 69 61 6c 20 43 50 55 20  n a special CPU 
00c0: 72 65 67 69 73 74 65 72 2e 0a 0a 54 68 65 20 6e  register...The n
00d0: 75 6d 62 65 72 20 6f 66 20 73 75 70 70 6f 72 74  umber of support
00e0: 65 64 20 64 61 74 61 20 77 6f 72 64 73 20 28 64  ed data words (d
00f0: 61 74 61 30 2c 64 61 74 61 31 29 20 69 73 20 61  ata0,data1) is a
0100: 72 62 69 74 72 61 72 79 3b 20 33 20 6f 72 20 34  rbitrary; 3 or 4
0110: 0a 6f 72 20 6d 6f 72 65 20 77 6f 75 6c 64 20 77  .or more would w
0120: 6f 72 6b 20 61 73 20 77 65 6c 6c 20 69 66 20 74  ork as well if t
0130: 72 61 6d 70 6f 6c 69 6e 65 2e 63 20 77 61 73 20  rampoline.c was 
0140: 6d 6f 64 69 66 69 65 64 20 61 70 70 72 6f 70 72  modified appropr
0150: 69 61 74 65 6c 79 2e 0a 54 77 6f 20 77 6f 72 64  iately..Two word
0160: 73 20 61 72 65 20 6e 65 65 64 65 64 2c 20 68 6f  s are needed, ho
0170: 77 65 76 65 72 2c 20 66 6f 72 20 70 61 73 73 69  wever, for passi
0180: 6e 67 20 63 6c 6f 73 75 72 65 73 20 74 68 72 6f  ng closures thro
0190: 75 67 68 20 76 61 63 61 6c 6c 5f 72 0a 77 69 74  ugh vacall_r.wit
01a0: 68 6f 75 74 20 61 6e 20 61 64 64 69 74 69 6f 6e  hout an addition
01b0: 61 6c 20 6d 61 6c 6c 6f 63 28 29 20 63 61 6c 6c  al malloc() call
01c0: 20 70 65 72 20 63 6c 6f 73 75 72 65 2e 0a 0a 54   per closure...T
01d0: 68 65 20 69 6e 63 6c 75 64 65 20 66 69 6c 65 20  he include file 
01e0: 3c 74 72 61 6d 70 6f 6c 69 6e 65 2e 68 3e 20 69  <trampoline.h> i
01f0: 73 20 72 65 6e 61 6d 65 64 20 74 6f 20 3c 74 72  s renamed to <tr
0200: 61 6d 70 6f 6c 69 6e 65 5f 72 2e 68 3e 2e 0a 0a  ampoline_r.h>...