Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mpim-sw
cdo
Commits
1c7282df
Commit
1c7282df
authored
May 23, 2017
by
Oliver Heidmann
Browse files
moved struct definitions of oper_t and process_t into process.h
parent
06e69148
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/process.cc
View file @
1c7282df
...
...
@@ -42,56 +42,7 @@
#include "dmemory.h"
#define MAX_PROCESS 128
#define MAX_STREAM 64
#define MAX_OPERATOR 128
#define MAX_OARGC 4096
#define MAX_FILES 65536
typedef
struct
{
int
f1
;
int
f2
;
const
char
*
name
;
const
char
*
enter
;
}
oper_t
;
typedef
struct
{
#if defined(HAVE_LIBPTHREAD)
pthread_t
threadID
;
int
l_threadID
;
#endif
short
nchild
;
short
nstream
;
short
streams
[
MAX_STREAM
];
double
s_utime
;
double
s_stime
;
double
a_utime
;
double
a_stime
;
double
cputime
;
off_t
nvals
;
short
nvars
;
int
ntimesteps
;
short
streamCnt
;
argument_t
*
streamNames
;
char
*
xoperator
;
const
char
*
operatorName
;
char
*
operatorArg
;
int
oargc
;
char
*
oargv
[
MAX_OARGC
];
char
prompt
[
64
];
short
noper
;
oper_t
oper
[
MAX_OPERATOR
];
}
process_t
;
static
process_t
Process
[
MAX_PROCESS
];
static
int
NumProcess
=
0
;
static
int
NumProcessActive
=
0
;
#if defined(HAVE_LIBPTHREAD)
pthread_mutex_t
processMutex
=
PTHREAD_MUTEX_INITIALIZER
;
...
...
@@ -157,7 +108,7 @@ int processSelf(void)
processID
=
0
;
}
pthread_mutex_unlock
(
&
processMutex
);
pthread_mutex_unlock
(
&
processMutex
);
#endif
...
...
src/process.h
View file @
1c7282df
...
...
@@ -18,7 +18,59 @@
#ifndef _PROCESS_H
#define _PROCESS_H
constexpr
int
MAX_PROCESS
=
128
;
constexpr
int
MAX_STREAM
=
64
;
constexpr
int
MAX_OPERATOR
=
128
;
constexpr
int
MAX_OARGC
=
4096
;
constexpr
int
MAX_FILES
=
65536
;
typedef
struct
{
int
f1
;
int
f2
;
const
char
*
name
;
const
char
*
enter
;
}
oper_t
;
#include <sys/types.h>
/* off_t */
#include "util.h"
typedef
struct
{
#if defined(HAVE_LIBPTHREAD)
pthread_t
threadID
;
int
l_threadID
;
#endif
short
nchild
;
short
nstream
;
short
streams
[
MAX_STREAM
];
double
s_utime
;
double
s_stime
;
double
a_utime
;
double
a_stime
;
double
cputime
;
off_t
nvals
;
short
nvars
;
int
ntimesteps
;
short
streamCnt
;
argument_t
*
streamNames
;
char
*
xoperator
;
const
char
*
operatorName
;
char
*
operatorArg
;
int
oargc
;
char
*
oargv
[
MAX_OARGC
];
char
prompt
[
64
];
short
noper
;
oper_t
oper
[
MAX_OPERATOR
];
}
process_t
;
static
process_t
Process
[
MAX_PROCESS
];
static
int
NumProcess
=
0
;
static
int
NumProcessActive
=
0
;
int
processSelf
(
void
);
int
processCreate
(
void
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment