Main Page | Modules | Data Structures | File List | Data Fields | Globals

src/jobs.h

Go to the documentation of this file.
00001 /* $Id: jobs.h,v 1.6 2006/09/08 18:18:08 ciesnik Exp $ */
00002 /*
00003  *  DRMAA library for Torque/PBS
00004  *  Copyright (C) 2006  Poznan Supercomputing and Networking Center
00005  *                      DSP team <dsp-devel@hedera.man.poznan.pl>
00006  *
00007  *  This library is free software; you can redistribute it and/or
00008  *  modify it under the terms of the GNU Lesser General Public
00009  *  License as published by the Free Software Foundation; either
00010  *  version 2.1 of the License, or (at your option) any later version.
00011  *
00012  *  This library is distributed in the hope that it will be useful,
00013  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00015  *  Lesser General Public License for more details.
00016  *
00017  *  You should have received a copy of the GNU Lesser General Public
00018  *  License along with this library; if not, write to the Free Software
00019  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00020  */
00021 
00027 #ifndef __DRMAA__JOBS_H
00028 #define __DRMAA__JOBS_H
00029 
00030 #ifdef HAVE_CONFIG_H
00031 # include <pbs_config.h>
00032 #endif
00033 
00034 #include <drmaa_impl.h>
00035 
00042 typedef enum {
00043   DRMAA_JOB_SUSPENDED  =  1<<0,
00044   DRMAA_JOB_RESUMED    =  1<<1,
00045   DRMAA_JOB_TERMINATED =  1<<2,
00046   DRMAA_JOB_DISPOSE    =  1<<3
00047 } job_flag_t;
00048 
00054 struct drmaa_job_s {
00055   drmaa_job_t *next;  
00056   char       *jobid;  
00061   int time_label;
00066   bool terminated;
00070   bool suspended;
00071 };
00072 
00073 typedef struct drmaa_job_iter_s drmaa_job_iter_t;
00074 
00075 enum { HASHTAB_SIZE = 1024 };
00076 
00078 struct drmaa_job_iter_s {
00079   drmaa_session_t  *c;
00080   unsigned          hash;  
00081   drmaa_job_t     **iter;
00082 };
00083 
00089 void
00090 drmaa_get_job_list_iter( drmaa_session_t *session, drmaa_job_iter_t *iter );
00091 
00093 drmaa_job_t *
00094 drmaa_get_next_job( drmaa_job_iter_t *iter );
00095 
00102 void
00103 drmaa_add_job(
00104     drmaa_session_t *c,
00105     drmaa_job_t *job
00106     );
00107 
00119 bool
00120 drmaa_find_job(
00121     drmaa_session_t  *c,
00122     const char       *jobid,
00123     drmaa_job_t      *found,
00124     unsigned          flags
00125     );
00126 
00127 void
00128 drmaa_delete_job_hashtab( drmaa_job_t **tab );
00129 
00132 #endif /* __DRMAA_JOBS_H */
00133 

Generated on Thu Oct 9 22:21:32 2008 for torque by  doxygen 1.3.9.1