home *** CD-ROM | disk | FTP | other *** search
- * Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
- * The C++ Answer Book */
- * Tony Hansen */
- * All rights reserved. */
- include <process.h>
- include <debug.h> /* DELETE */
- oid process::kill(long res)
-
- if (debug) /*DELETE*/ cerr << "process" << this << "::kill(" << res << ")\n";
- if (debug) /*DELETE*/ cerr << "\t" << this << "->t_curstate == " << ps_print(t_curstate) << "\n";
- if (t_curstate == TASK_RUNNABLE)
- rmfromlist(this, &t_runprocesses);
-
- else if (t_curstate == TASK_IDLE)
- rmfromlist(this, &t_waitprocesses);
-
- t_curstate = TASK_TERMINATED;
- t_next = t_doneprocesses;
- t_doneprocesses = this;
- if (debug) /*DELETE*/ cerr << "\t" << this << "->t_curstate <- " << ps_print(t_curstate) << "\n";
- t_result = res;
- alert();
- if (debug) /*DELETE*/ cerr << "<<<< process" << this << "::kill(" << res << ")\n";
-
-