Skip to content
This repository
Newer
Older
100644 344 lines (215 sloc) 7.849 kb
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
1 /*
3f0c0084 »
2011-09-07 use a hash keyed by int in Schecduler task_list to avoid string-int c…
2 Copyright (C) 2001-2011, Parrot Foundation.
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
3
4 =head1 NAME
5
6 src/pmc/scheduler.pmc - The concurrency scheduler
7
8 =head1 DESCRIPTION
9
10 Implements the core concurrency scheduler.
11
d6808fe8 »
2007-12-12 [events] Add interface for event handling, add subtype attribute to t…
12 =head2 Vtable Functions
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
13
14 =over 4
15
16 =cut
17
18 */
19
ec73fb31 »
2007-12-06 [concurrency] Divide scheduler headers into public and private (for c…
20 #include "parrot/scheduler_private.h"
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
21
6bdd5f99 »
2010-03-28 headerizer now runs on PMC files
22 /* HEADERIZER HFILE: none */
23 /* HEADERIZER BEGIN: static */
24 /* HEADERIZER END: static */
25
6b817608 »
2009-08-23 [pmc] we don't need need_ext anymore, so BALEETED
26 pmclass Scheduler auto_attrs {
fb0dfd8a »
2010-06-30 Progress on alarms / timers.
27 ATTR INTVAL id; /* The scheduler's ID. */
28 ATTR PMC *handlers; /* The list of currently active handlers. */
29 ATTR PMC *messages; /* A message queue used for communication
30 between schedulers. */
2255840f »
2008-08-02 [pdd17pmc] Merging the pdd25cx branch into trunk for r26555 to r29949.
31
9f3e20df »
2010-07-01 [gsoc_threads] Alarms work, at least the easy way.
32 ATTR PMC *task_queue; /* List of tasks/green threads waiting to run */
33 ATTR PMC *alarms; /* List of future alarms ordered by time */
fb0dfd8a »
2010-06-30 Progress on alarms / timers.
34
9110bb80 »
2010-07-21 [gsoc_threads] More green threads API.
35 ATTR PMC *all_tasks; /* Hash of all active tasks by ID */
36 ATTR UINTVAL next_task_id; /* ID to assign to the next created task */
e6fa7fc8 »
2011-10-29 rename enable_event_checking -> Parrot_runcore_enable_event_checking,…
37 ATTR INTVAL enable_preemption;
38 /* Can perform uncooperative task preemption */
39 ATTR INTVAL enable_scheduling;
40 /* Can perform task scheduling behaviors */
9110bb80 »
2010-07-21 [gsoc_threads] More green threads API.
41
fb0dfd8a »
2010-06-30 Progress on alarms / timers.
42 ATTR Parrot_Interp interp; /* A link to the scheduler's interpreter. */
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
43
44 /*
45
46 =item C<void init()>
47
be7602b4 »
2008-08-09 [PMC] Fixed compiler warnings (use of uninitialized variables) and ti…
48 Initializes a concurrency scheduler object.
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
49
50 =cut
51
52 */
53
59661f18 »
2008-03-11 [pdd17pmc] Merging the pdd17pmc branch into trunk (r24435 to r26307).
54 VTABLE void init() {
971e9977 »
2008-09-08 rename pmc attributes struct from Parrot_<type> to Parrot_<type>_attr…
55 Parrot_Scheduler_attributes * const core_struct =
5a7584e8 »
2009-08-18 merge auto_attrs branch into trunk
56 (Parrot_Scheduler_attributes *) PMC_data(SELF);
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
57
1997c49c »
2009-02-12 [gc] remove/replace DOD references in core PMCs
58 /* Set flags for custom GC mark and destroy. */
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
59 PObj_custom_mark_SET(SELF);
4591dbb8 »
2009-09-03 [HLL] Fixed two compilation-breaking typos accidentally committed in …
60 PObj_custom_destroy_SET(SELF);
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
61
62 /* Set up the core struct. */
9110bb80 »
2010-07-21 [gsoc_threads] More green threads API.
63 core_struct->id = 0;
64 core_struct->handlers = Parrot_pmc_new(INTERP, enum_class_ResizablePMCArray);
65 core_struct->messages = Parrot_pmc_new(INTERP, enum_class_ResizablePMCArray);
66 core_struct->task_queue = Parrot_pmc_new(INTERP, enum_class_PMCList);
67 core_struct->alarms = Parrot_pmc_new(INTERP, enum_class_PMCList);
68 core_struct->all_tasks = Parrot_pmc_new(INTERP, enum_class_Hash);
e6fa7fc8 »
2011-10-29 rename enable_event_checking -> Parrot_runcore_enable_event_checking,…
69 core_struct->enable_scheduling = 0;
70 core_struct->enable_preemption = 0;
9110bb80 »
2010-07-21 [gsoc_threads] More green threads API.
71 core_struct->next_task_id = 0;
72 core_struct->interp = INTERP;
73
74 /* Chandon TODO: Delete from int-keyed hash doesn't like me. */
75 /* VTABLE_set_integer_native(interp, core_struct->all_tasks, Hash_key_type_int); */
76
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
77 }
78
be7602b4 »
2008-08-09 [PMC] Fixed compiler warnings (use of uninitialized variables) and ti…
79
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
80 /*
81
96858eea »
2007-12-03 [PMC] Added init_pmc() to Scheduler PMC, with tests.
82 =item C<void init_pmc(PMC *data)>
83
84 Initializes a new Scheduler with a C<Hash> PMC with any or all of the keys:
85
86 =over 4
87
88 =item C<id>
89
90 An C<Integer> representing the unique identifier for this scheduler.
91
92 =back
93
be7602b4 »
2008-08-09 [PMC] Fixed compiler warnings (use of uninitialized variables) and ti…
94 =cut
95
96858eea »
2007-12-03 [PMC] Added init_pmc() to Scheduler PMC, with tests.
96 */
97
59661f18 »
2008-03-11 [pdd17pmc] Merging the pdd17pmc branch into trunk (r24435 to r26307).
98 VTABLE void init_pmc(PMC *data) {
96858eea »
2007-12-03 [PMC] Added init_pmc() to Scheduler PMC, with tests.
99 PMC *elem;
971e9977 »
2008-09-08 rename pmc attributes struct from Parrot_<type> to Parrot_<type>_attr…
100 Parrot_Scheduler_attributes *core_struct;
96858eea »
2007-12-03 [PMC] Added init_pmc() to Scheduler PMC, with tests.
101
be7602b4 »
2008-08-09 [PMC] Fixed compiler warnings (use of uninitialized variables) and ti…
102 if (!VTABLE_isa(INTERP, data, CONST_STRING(INTERP, "Hash")))
2255840f »
2008-08-02 [pdd17pmc] Merging the pdd25cx branch into trunk for r26555 to r29949.
103 Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_INVALID_OPERATION,
4d9c9604 »
2008-01-05 [concurrency] Next stage of concurrency implementation, message passi…
104 "Scheduler initializer must be a Hash");
96858eea »
2007-12-03 [PMC] Added init_pmc() to Scheduler PMC, with tests.
105
4d9c9604 »
2008-01-05 [concurrency] Next stage of concurrency implementation, message passi…
106 SELF.init();
96858eea »
2007-12-03 [PMC] Added init_pmc() to Scheduler PMC, with tests.
107
be7602b4 »
2008-08-09 [PMC] Fixed compiler warnings (use of uninitialized variables) and ti…
108 core_struct = PARROT_SCHEDULER(SELF);
109 elem = VTABLE_get_pmc_keyed_str(INTERP, data, CONST_STRING(INTERP, "id"));
96858eea »
2007-12-03 [PMC] Added init_pmc() to Scheduler PMC, with tests.
110
be7602b4 »
2008-08-09 [PMC] Fixed compiler warnings (use of uninitialized variables) and ti…
111 if (!PMC_IS_NULL(elem))
112 core_struct->id = VTABLE_get_integer(INTERP, elem);
96858eea »
2007-12-03 [PMC] Added init_pmc() to Scheduler PMC, with tests.
113 }
114
115 /*
116
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
117 =item C<void push_pmc(PMC *value)>
118
be7602b4 »
2008-08-09 [PMC] Fixed compiler warnings (use of uninitialized variables) and ti…
119 Inserts a task into the task list, giving it a task ID one higher than the
98ca8df8 »
2007-12-31 [concurrency] Further work on the new concurrency scheduler. (With ap…
120 current maximum, and a birthtime of the current time.
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
121
122 =cut
123
124 */
125
e9221160 »
2007-12-04 [concurrency] Initial implementation of concurrency scheduler runloop.
126 void push_pmc(PMC *task) {
3fe43f82 »
2011-10-26 Fix conflicts after merge to newest master
127 /* TODO: This doesn't appear to do anything */
971e9977 »
2008-09-08 rename pmc attributes struct from Parrot_<type> to Parrot_<type>_attr…
128 Parrot_Scheduler_attributes * const core_struct = PARROT_SCHEDULER(SELF);
9ddac318 »
2011-10-28 cleanup Scheduler.pmc and Task.pmc. Add const for the optimizer. Fix …
129 PMC * const type_pmc = VTABLE_get_attr_str(interp, task, CONST_STRING(interp, "type"));
130 STRING * const type = VTABLE_get_string(interp, type_pmc);
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
131 }
132
be7602b4 »
2008-08-09 [PMC] Fixed compiler warnings (use of uninitialized variables) and ti…
133
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
134 /*
135
136 =item C<PMC *pop_pmc()>
137
be7602b4 »
2008-08-09 [PMC] Fixed compiler warnings (use of uninitialized variables) and ti…
138 Retrieves the next task from the task list. If the task index is invalid,
139 recalculates it before retrieving the next task.
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
140
141 =cut
142
143 */
144
59661f18 »
2008-03-11 [pdd17pmc] Merging the pdd17pmc branch into trunk (r24435 to r26307).
145 VTABLE PMC *pop_pmc() {
9ddac318 »
2011-10-28 cleanup Scheduler.pmc and Task.pmc. Add const for the optimizer. Fix …
146 Parrot_Scheduler_attributes * const core_struct = PARROT_SCHEDULER(SELF);
147 PMC * const task = VTABLE_shift_pmc(INTERP, core_struct->task_queue);
98ca8df8 »
2007-12-31 [concurrency] Further work on the new concurrency scheduler. (With ap…
148 return task;
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
149 }
150
be7602b4 »
2008-08-09 [PMC] Fixed compiler warnings (use of uninitialized variables) and ti…
151
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
152 /*
153
2f43c232 »
2007-12-02 [concurrency] Initialize interp struct member in Scheduler. Add a way to
154 =item C<INTVAL get_integer()>
155
be7602b4 »
2008-08-09 [PMC] Fixed compiler warnings (use of uninitialized variables) and ti…
156 Retrieves the number of pending tasks in the scheduler's task list.
2f43c232 »
2007-12-02 [concurrency] Initialize interp struct member in Scheduler. Add a way to
157
158 =cut
159
160 */
161
59661f18 »
2008-03-11 [pdd17pmc] Merging the pdd17pmc branch into trunk (r24435 to r26307).
162 VTABLE INTVAL get_integer() {
fd1a8003 »
2011-10-18 removed unused var task_id_str. Consted a pointer, and marked an inte…
163 Parrot_Scheduler_attributes * const core_struct = PARROT_SCHEDULER(SELF);
856f3b25 »
2011-09-25 Cleanup green_threads/kill_threads merge, builds now
164 return VTABLE_elements(INTERP, core_struct->task_queue);
e9221160 »
2007-12-04 [concurrency] Initial implementation of concurrency scheduler runloop.
165 }
166
be7602b4 »
2008-08-09 [PMC] Fixed compiler warnings (use of uninitialized variables) and ti…
167
e9221160 »
2007-12-04 [concurrency] Initial implementation of concurrency scheduler runloop.
168 /*
169
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
170 =item C<void destroy()>
171
be7602b4 »
2008-08-09 [PMC] Fixed compiler warnings (use of uninitialized variables) and ti…
172 Frees the scheduler's underlying struct.
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
173
174 =cut
175
176 */
59661f18 »
2008-03-11 [pdd17pmc] Merging the pdd17pmc branch into trunk (r24435 to r26307).
177 VTABLE void destroy() {
465b364f »
2012-05-08 Don't clear the scheduler field from the interp when the Scheduler PM…
178 UNUSED(SELF);
fd1a8003 »
2011-10-18 removed unused var task_id_str. Consted a pointer, and marked an inte…
179 UNUSED(interp);
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
180 }
181
be7602b4 »
2008-08-09 [PMC] Fixed compiler warnings (use of uninitialized variables) and ti…
182
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
183 /*
184
185 =item C<void mark()>
186
be7602b4 »
2008-08-09 [PMC] Fixed compiler warnings (use of uninitialized variables) and ti…
187 Marks any referenced strings and PMCs as live.
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
188
189 =cut
190
191 */
59661f18 »
2008-03-11 [pdd17pmc] Merging the pdd17pmc branch into trunk (r24435 to r26307).
192 VTABLE void mark() {
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
193 if (PARROT_SCHEDULER(SELF)) {
971e9977 »
2008-09-08 rename pmc attributes struct from Parrot_<type> to Parrot_<type>_attr…
194 Parrot_Scheduler_attributes * const core_struct = PARROT_SCHEDULER(SELF);
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
195
26914e12 »
2010-05-05 changed interp in pmc class to INTERP for unification
196 Parrot_gc_mark_PMC_alive(INTERP, core_struct->handlers);
197 Parrot_gc_mark_PMC_alive(INTERP, core_struct->messages);
9f3e20df »
2010-07-01 [gsoc_threads] Alarms work, at least the easy way.
198 Parrot_gc_mark_PMC_alive(INTERP, core_struct->task_queue);
199 Parrot_gc_mark_PMC_alive(INTERP, core_struct->alarms);
9110bb80 »
2010-07-21 [gsoc_threads] More green threads API.
200 Parrot_gc_mark_PMC_alive(INTERP, core_struct->all_tasks);
5d8728ec »
2010-07-02 [gsoc_threads] Fix some failing tests.
201 }
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
202 }
203
be7602b4 »
2008-08-09 [PMC] Fixed compiler warnings (use of uninitialized variables) and ti…
204
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
205 /*
206
b101f2ca »
2010-02-02 Merge pmc_freeze_with_pmcs into trunk.
207 =item C<void visit(PMC *info)>
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
208
be7602b4 »
2008-08-09 [PMC] Fixed compiler warnings (use of uninitialized variables) and ti…
209 Visits the contents of the scheduler (used by freeze/thaw).
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
210
be7602b4 »
2008-08-09 [PMC] Fixed compiler warnings (use of uninitialized variables) and ti…
211 C<*info> is the visit info (see F<include/parrot/pmc_freeze.h>).
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
212
213 =cut
214
215 */
216
b101f2ca »
2010-02-02 Merge pmc_freeze_with_pmcs into trunk.
217 VTABLE void visit(PMC *info) {
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
218 /* 1) visit task list */
62b52c92 »
2010-07-04 [gsoc_threads] Added callback PMC to handle NCI.
219 VISIT_PMC_ATTR(INTERP, info, SELF, Scheduler, task_queue);
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
220
221 /* 2) visit the handlers */
4c434759 »
2010-01-13 merge branch pmc_freeze_cleanup
222 VISIT_PMC_ATTR(INTERP, info, SELF, Scheduler, handlers);
62b52c92 »
2010-07-04 [gsoc_threads] Added callback PMC to handle NCI.
223
224 /* 3) visit the alarms */
225 VISIT_PMC_ATTR(INTERP, info, SELF, Scheduler, alarms);
9110bb80 »
2010-07-21 [gsoc_threads] More green threads API.
226
227 /* 3) visit all tasks */
228 VISIT_PMC_ATTR(INTERP, info, SELF, Scheduler, all_tasks);
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
229 }
230
be7602b4 »
2008-08-09 [PMC] Fixed compiler warnings (use of uninitialized variables) and ti…
231
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
232 /*
233
b101f2ca »
2010-02-02 Merge pmc_freeze_with_pmcs into trunk.
234 =item C<void freeze(PMC *info)>
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
235
be7602b4 »
2008-08-09 [PMC] Fixed compiler warnings (use of uninitialized variables) and ti…
236 Archives the scheduler.
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
237
238 =cut
239
240 */
241
b101f2ca »
2010-02-02 Merge pmc_freeze_with_pmcs into trunk.
242 VTABLE void freeze(PMC *info) {
971e9977 »
2008-09-08 rename pmc attributes struct from Parrot_<type> to Parrot_<type>_attr…
243 Parrot_Scheduler_attributes * const core_struct = PARROT_SCHEDULER(SELF);
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
244
245 /* 1) freeze scheduler id */
4c434759 »
2010-01-13 merge branch pmc_freeze_cleanup
246 VTABLE_push_integer(INTERP, info, core_struct->id);
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
247 }
248
249 /*
250
b101f2ca »
2010-02-02 Merge pmc_freeze_with_pmcs into trunk.
251 =item C<void thaw(PMC *info)>
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
252
be7602b4 »
2008-08-09 [PMC] Fixed compiler warnings (use of uninitialized variables) and ti…
253 Unarchives the scheduler.
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
254
255 =cut
256
257 */
258
b101f2ca »
2010-02-02 Merge pmc_freeze_with_pmcs into trunk.
259 VTABLE void thaw(PMC *info) {
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
260 /* 1. thaw scheduler id */
4c434759 »
2010-01-13 merge branch pmc_freeze_cleanup
261 const INTVAL id = VTABLE_shift_integer(INTERP, info);
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
262
263 /* Allocate the scheduler's core data struct and set custom flags. */
264 SELF.init();
265
266 /* Set the scheduler's id to the frozen id */
267 PARROT_SCHEDULER(SELF)->id = id;
268 }
269
be7602b4 »
2008-08-09 [PMC] Fixed compiler warnings (use of uninitialized variables) and ti…
270
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
271 /*
272
b101f2ca »
2010-02-02 Merge pmc_freeze_with_pmcs into trunk.
273 =item C<void thawfinish(PMC *info)>
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
274
be7602b4 »
2008-08-09 [PMC] Fixed compiler warnings (use of uninitialized variables) and ti…
275 Finishes thawing the scheduler.
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
276
277 =cut
278
279 */
280
b101f2ca »
2010-02-02 Merge pmc_freeze_with_pmcs into trunk.
281 VTABLE void thawfinish(PMC *info) {
5d8728ec »
2010-07-02 [gsoc_threads] Fix some failing tests.
282 /* Parrot_cx_refresh_task_list(INTERP, SELF); */
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
283 }
284
be7602b4 »
2008-08-09 [PMC] Fixed compiler warnings (use of uninitialized variables) and ti…
285
d6808fe8 »
2007-12-12 [events] Add interface for event handling, add subtype attribute to t…
286 /*
287
288 =back
289
290 =head2 Methods
291
292 =over 4
293
294 =cut
295
296 */
297
298 /*
299
9110bb80 »
2010-07-21 [gsoc_threads] More green threads API.
300 =item C<METHOD active_tasks()>
2255840f »
2008-08-02 [pdd17pmc] Merging the pdd25cx branch into trunk for r26555 to r29949.
301
9110bb80 »
2010-07-21 [gsoc_threads] More green threads API.
302 Returns a ResizablePMCArray containing pointers to all active tasks.
2255840f »
2008-08-02 [pdd17pmc] Merging the pdd25cx branch into trunk for r26555 to r29949.
303
304 =cut
305
306 */
307
9110bb80 »
2010-07-21 [gsoc_threads] More green threads API.
308 METHOD active_tasks() {
309 Parrot_Scheduler_attributes *sdata = PARROT_SCHEDULER(SELF);
9ddac318 »
2011-10-28 cleanup Scheduler.pmc and Task.pmc. Add const for the optimizer. Fix …
310 PMC * const tasks = Parrot_pmc_new(interp, enum_class_ResizablePMCArray);
311 PMC * const iter = Parrot_pmc_new_init(interp, enum_class_HashIterator, sdata->all_tasks);
9110bb80 »
2010-07-21 [gsoc_threads] More green threads API.
312
313 while (!VTABLE_get_bool(interp, iter)) {
9ddac318 »
2011-10-28 cleanup Scheduler.pmc and Task.pmc. Add const for the optimizer. Fix …
314 PMC * const pair = VTABLE_shift_pmc(interp, iter);
315 PMC * task = PMCNULL;
316 STRING * const value = CONST_STRING(interp, "value");
9110bb80 »
2010-07-21 [gsoc_threads] More green threads API.
317 Parrot_pcc_invoke_method_from_c_args(interp, pair,
9ddac318 »
2011-10-28 cleanup Scheduler.pmc and Task.pmc. Add const for the optimizer. Fix …
318 value, "->P", &task);
9110bb80 »
2010-07-21 [gsoc_threads] More green threads API.
319 VTABLE_push_pmc(interp, tasks, task);
2255840f »
2008-08-02 [pdd17pmc] Merging the pdd25cx branch into trunk for r26555 to r29949.
320 }
321
9110bb80 »
2010-07-21 [gsoc_threads] More green threads API.
322 RETURN(PMC* tasks);
2255840f »
2008-08-02 [pdd17pmc] Merging the pdd25cx branch into trunk for r26555 to r29949.
323 }
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
324 }
325
326 /*
327
328 =back
329
330 =head1 SEE ALSO
331
4d9c9604 »
2008-01-05 [concurrency] Next stage of concurrency implementation, message passi…
332 F<docs/pdds/pdd25_concurrency.pod>.
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
333
334 =cut
335
336 */
337
338 /*
339 * Local variables:
340 * c-file-style: "parrot"
341 * End:
1d7dded8 »
2010-11-29 update C file vim modelines
342 * vim: expandtab shiftwidth=4 cinoptions='\:2=2' :
1d259c67 »
2007-11-25 [concurrency] Initial implementations of the Scheduler and Task PMCs.
343 */
Something went wrong with that request. Please try again.