source: trunk/pbs_drmaa/log_reader.h @ 29

Revision 29, 1.6 KB checked in by mmamonski, 12 years ago (diff)

log reder reStructured

  • Property svn:keywords set to Id
Line 
1/* $Id$ */
2/*
3 *  FedStage DRMAA for PBS Pro
4 *  Copyright (C) 2006-2009  FedStage Systems
5 *
6 *  This program is free software: you can redistribute it and/or modify
7 *  it under the terms of the GNU General Public License as published by
8 *  the Free Software Foundation, either version 3 of the License, or
9 *  (at your option) any later version.
10 *
11 *  This program is distributed in the hope that it will be useful,
12 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 *  GNU General Public License for more details.
15 *
16 *  You should have received a copy of the GNU General Public License
17 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20#ifndef __PBS_DRMAA__LOG_READER_H
21#define __PBS_DRMAA__LOG_READER_H
22
23#ifdef HAVE_CONFIG_H
24#       include <config.h>
25#endif
26
27#include <stdio.h>
28
29#include <drmaa_utils/job.h>
30#include <drmaa_utils/session.h>
31
32typedef struct pbsdrmaa_log_reader_s pbsdrmaa_log_reader_t;
33
34pbsdrmaa_log_reader_t *
35pbsdrmaa_log_reader_new ( fsd_drmaa_session_t * session);
36
37void
38pbsdrmaa_log_reader_destroy ( pbsdrmaa_log_reader_t * self );
39
40struct pbsdrmaa_log_reader_s {
41        fsd_drmaa_session_t *volatile session ;
42       
43        void (*read_log) ( pbsdrmaa_log_reader_t * self );
44       
45        void (*select_file) ( pbsdrmaa_log_reader_t * self );
46       
47        /* determines if function should run */
48        bool run_flag;
49       
50        /* date of current file */
51        time_t t;       
52       
53        /* log file handle */
54        FILE *fhandle;
55       
56        /* for wait_thread - day changed */
57        bool volatile date_changed;
58       
59        /* for wait_thread - log file first open */
60        bool volatile first_open;       
61};
62
63#endif /* __PBS_DRMAA__LOG_READER_H */
Note: See TracBrowser for help on using the repository browser.