|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T t
Length: 2644 (0xa54) Types: TextFile Names: »task_act.c«
└─⟦2d1937cfd⟧ Bits:30007241 EUUGD22: P.P 5.0 └─⟦35176feda⟧ »EurOpenD22/isode/isode-6.tar.Z« └─⟦de7628f85⟧ └─⟦this⟧ »isode-6.0/quipu/task_act.c«
/* task_act.c - routines to manipulate task activity blocks */ #ifndef lint static char *rcsid = "$Header: /f/osi/quipu/RCS/task_act.c,v 7.0 89/11/23 22:18:11 mrose Rel $"; #endif /* * $Header: /f/osi/quipu/RCS/task_act.c,v 7.0 89/11/23 22:18:11 mrose Rel $ * * * $Log: task_act.c,v $ * Revision 7.0 89/11/23 22:18:11 mrose * Release 6.0 * */ /* * NOTICE * * Acquisition, use, and distribution of this module and related * materials are subject to the restrictions of a license agreement. * Consult the Preface in the User's Manual for the full terms of * this agreement. * */ #include "quipu/util.h" #include "quipu/connection.h" extern LLog * log_dsap; struct task_act *task_alloc() { struct task_act * tk_ret; tk_ret = (struct task_act *) calloc(1,sizeof(struct task_act)); tk_ret->tk_cha = &(tk_ret->tk_req.dca_charg); tk_ret->tk_result = &(tk_ret->tk_resp.resp_res); tk_ret->tk_error = &(tk_ret->tk_resp.resp_err); return(tk_ret); } task_free(tk) struct task_act * tk; { DLOG(log_dsap, LLOG_TRACE, ("task_free()")); response_free (&(tk->tk_resp)); op_arg_free (&(tk->tk_req)); free((char *)tk); } /* * Extract task from list held by the connection it was received on. */ task_conn_extract(tk) struct task_act * tk; { struct task_act * tk_tmp; struct task_act **tk_p; DLOG(log_dsap, LLOG_TRACE, ("task_conn_extract()")); tk_p = &(tk->tk_conn->cn_tasklist); for(tk_tmp = (*tk_p); tk_tmp!=NULLTASK; tk_tmp=tk_tmp->tk_next) { if(tk_tmp == tk) break; tk_p = &(tk_tmp->tk_next); } if(tk_tmp == NULLTASK) { LLOG(log_dsap, LLOG_EXCEPTIONS, ("task_conn_extract: task lost from connections list.")); } else { (*tk_p) = tk->tk_next; } } task_extract(tk) struct task_act * tk; { struct oper_act * on; DLOG (log_dsap,LLOG_TRACE, ("task_extract()")); if(tk == NULLTASK) { LLOG (log_dsap,LLOG_FATAL,("Attempted to extract NULLTASK!!")); return; } for(on = tk->tk_operlist; on!=NULLOPER; on = on->on_next_task) { oper_task_extract(on); if(on->on_conn == NULLCONN) oper_free(on); } task_free(tk); DLOG (log_dsap,LLOG_TRACE, ("task block extracted")); } task_log(tk) struct task_act * tk; { struct oper_act * on; DLOG (log_dsap,LLOG_NOTICE, ("Task id = %d, state = %d, type = %d, prio = %d.", tk->tk_id, tk->tk_state, tk->tk_type, tk->tk_prio)); if(tk->tk_operlist != NULLOPER) DLOG (log_dsap,LLOG_DEBUG, ("Task-Opers:")); for(on=tk->tk_operlist; on != NULLOPER; on = on->on_next_task) oper_log(on); }