source: trunk/pbs_drmaa/pbs_conn.h @ 85

Revision 85, 2.1 KB checked in by mmamonski, 11 years ago (diff)

PBS DRMAA autoclose connection

  • Property svn:keywords set to Id
RevLine 
[12]1/* $Id$ */
[7]2/*
[76]3 *  PSNC DRMAA for Torque/PBS Pro
4 *  Copyright (C) 2012 Poznan Supercomputing and Networking Center
[7]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 
[76]20#ifndef __PBS_DRMAA__PBS_CONN_H
21#define __PBS_DRMAA__PBS_CONN_H
[7]22
23#ifdef HAVE_CONFIG_H
24#       include <config.h>
25#endif
26
[29]27#include <stdio.h>
28
[7]29#include <drmaa_utils/job.h>
30#include <drmaa_utils/session.h>
[85]31#include <drmaa_utils/thread.h>
[7]32
33
[76]34#include <pbs_ifl.h>
[7]35
[76]36typedef struct pbsdrmaa_pbs_conn_s pbsdrmaa_pbs_conn_t;
37
[85]38pbsdrmaa_pbs_conn_t *
39pbsdrmaa_pbs_conn_new(
40                fsd_drmaa_session_t * session,
41                const char *server);
[76]42
[85]43void pbsdrmaa_pbs_conn_destroy ( pbsdrmaa_pbs_conn_t * self );
[7]44
[76]45struct pbsdrmaa_pbs_conn_s {
[85]46        fsd_drmaa_session_t *volatile session;
[48]47
[76]48        char* (*submit) ( pbsdrmaa_pbs_conn_t *self, struct attropl *attrib, char *script, char *destination );
[48]49
[76]50        struct batch_status* (*statjob) ( pbsdrmaa_pbs_conn_t *self,  char *job_id, struct attrl *attrib );
[48]51
[76]52        void (*statjob_free) ( pbsdrmaa_pbs_conn_t *self, struct batch_status* job_status );
53
54        void (*sigjob) ( pbsdrmaa_pbs_conn_t *self, char *job_id, char *signal );
55
56        void (*deljob) ( pbsdrmaa_pbs_conn_t *self, char *job_id );
57
58        void (*rlsjob) ( pbsdrmaa_pbs_conn_t *self, char *job_id );
59
60        void (*holdjob) ( pbsdrmaa_pbs_conn_t *self, char *job_id );
[7]61       
[76]62        /* contact string */
63        char *server;
64        /* connection descriptor */
65        int connection_fd;
[7]66       
[85]67        /* timestamp of last connect time */
68        time_t last_connect_time;
69
70        fsd_cond_t autoclose_cond;
71        fsd_mutex_t autoclose_mutex;
72        bool close_connection;
[7]73};
74
[76]75#endif /* __PBS_DRMAA__PBS_CONN_H */
Note: See TracBrowser for help on using the repository browser.