Changeset 76 for trunk/pbs_drmaa/pbs_conn.h
- Timestamp:
- 09/17/12 23:25:29 (12 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/pbs_drmaa/pbs_conn.h
r48 r76 1 1 /* $Id$ */ 2 2 /* 3 * FedStage DRMAA forPBS Pro4 * Copyright (C) 20 06-2009 FedStage Systems3 * PSNC DRMAA for Torque/PBS Pro 4 * Copyright (C) 2012 Poznan Supercomputing and Networking Center 5 5 * 6 6 * This program is free software: you can redistribute it and/or modify … … 18 18 */ 19 19 20 #ifndef __PBS_DRMAA__ LOG_READER_H21 #define __PBS_DRMAA__ LOG_READER_H20 #ifndef __PBS_DRMAA__PBS_CONN_H 21 #define __PBS_DRMAA__PBS_CONN_H 22 22 23 23 #ifdef HAVE_CONFIG_H … … 30 30 #include <drmaa_utils/session.h> 31 31 32 typedef struct pbsdrmaa_log_reader_s pbsdrmaa_log_reader_t; 32 #include <session.h> 33 33 34 pbsdrmaa_log_reader_t * 35 pbsdrmaa_log_reader_new ( fsd_drmaa_session_t * session); 34 #include <pbs_ifl.h> 35 36 typedef struct pbsdrmaa_pbs_conn_s pbsdrmaa_pbs_conn_t; 37 38 pbsdrmaa_pbs_conn_t * pbsdrmaa_pbs_conn_new ( pbsdrmaa_session_t * session, char *server); 36 39 37 40 void 38 pbsdrmaa_ log_reader_destroy ( pbsdrmaa_log_reader_t * self );41 pbsdrmaa_pbs_conn_destroy ( pbsdrmaa_pbs_conn_t * self ); 39 42 40 struct pbsdrmaa_log_reader_s { 41 fsd_drmaa_session_t *volatile session ; 43 struct pbsdrmaa_pbs_conn_s { 44 pbsdrmaa_session_t *volatile session; 45 46 char* (*submit) ( pbsdrmaa_pbs_conn_t *self, struct attropl *attrib, char *script, char *destination ); 47 48 struct batch_status* (*statjob) ( pbsdrmaa_pbs_conn_t *self, char *job_id, struct attrl *attrib ); 49 50 void (*statjob_free) ( pbsdrmaa_pbs_conn_t *self, struct batch_status* job_status ); 51 52 void (*sigjob) ( pbsdrmaa_pbs_conn_t *self, char *job_id, char *signal ); 53 54 void (*deljob) ( pbsdrmaa_pbs_conn_t *self, char *job_id ); 55 56 void (*rlsjob) ( pbsdrmaa_pbs_conn_t *self, char *job_id ); 57 58 void (*holdjob) ( pbsdrmaa_pbs_conn_t *self, char *job_id ); 42 59 43 void (*read_log) ( pbsdrmaa_log_reader_t * self ); 60 /* contact string */ 61 char *server; 62 /* connection descriptor */ 63 int connection_fd; 44 64 45 void (*select_file) ( pbsdrmaa_log_reader_t * self ); 46 47 void (*close) ( pbsdrmaa_log_reader_t * self ); 48 49 void (*reopen) ( pbsdrmaa_log_reader_t * self ); 50 51 52 /* determines if function should run */ 53 bool run_flag; 54 55 /* date of current file */ 56 time_t t; 57 58 /* log file handle */ 59 FILE *fhandle; 60 61 /* for wait_thread - day changed */ 62 bool volatile date_changed; 63 64 /* for wait_thread - log file first open */ 65 bool volatile first_open; 66 67 char *volatile log_path; 68 69 off_t volatile current_offset; 65 /* timestamp of last usage */ 66 time_t last_usage; 70 67 }; 71 68 72 #endif /* __PBS_DRMAA__ LOG_READER_H */69 #endif /* __PBS_DRMAA__PBS_CONN_H */
Note: See TracChangeset
for help on using the changeset viewer.