]> gcc.gnu.org Git - gcc.git/blame - libchill/continue.c
* Add library exception clause to the copyright notice for all
[gcc.git] / libchill / continue.c
CommitLineData
b79f73df
JL
1/* Implement tasking-related runtime actions for CHILL.
2 Copyright (C) 1992,1993 Free Software Foundation, Inc.
3 Author: Wilfried Moser
4
5This file is part of GNU CC.
6
7GNU CC is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation; either version 2, or (at your option)
10any later version.
11
12GNU CC is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with GNU CC; see the file COPYING. If not, write to
19the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
20
502b941f
JL
21/* As a special exception, if you link this library with other files,
22 some of which are compiled with GCC, to produce an executable,
23 this library does not by itself cause the resulting executable
24 to be covered by the GNU General Public License.
25 This exception does not however invalidate any other reasons why
26 the executable file might be covered by the GNU General Public License. */
27
b79f73df
JL
28#include "rtltypes.h"
29#include "rts.h"
30
31/*
32 * function __continue
33 *
34 * parameters:
35 * evaddr pointer to Eventlocation
36 * filename source file name where function gets called
37 * lineno linenumber in source file
38 *
39 * returns:
40 * void
41 *
42 * exceptions:
43 * none
44 *
45 * abstract:
46 * implement the CHILL CONTINUE action.
47 */
48
49void
50__continue (evaddr, filename, lineno)
51 Event_Queue **evaddr;
52 char *filename;
53 int lineno;
54{
55 Event_Queue *ev = *evaddr;
56 Event_Queue *wrk;
57
58 if (ev == 0)
59 /* nothing to do */
60 return;
61
62 /* search for 1st one is not already continued */
63 while (ev && ev->is_continued)
64 ev = ev->forward;
65 if (!ev)
66 /* all have been continued in that queue, do nothing */
67 return;
68
69 wrk = ev->startlist;
70 while (wrk)
71 {
72 Event_Queue *tmp = (Event_Queue *)wrk->listhead;
73
74 while (tmp->forward != wrk)
75 tmp = tmp->forward;
76 tmp->forward = wrk->forward;
77 wrk = wrk->chain;
78 }
79
80 /* so far so good, continue this one */
81 ev->is_continued = 1;
82 ev->who_continued = THIS;
83
84 /* tell the runtime system to activate the process */
85 __continue_that (ev->this, ev->priority, filename, lineno);
86}
87
88/* force function print_event to be linked */
89extern void __print_event ();
90static EntryPoint pev = __print_event;
This page took 0.040843 seconds and 5 git commands to generate.