mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=3510
This commit is contained in:
parent
baabcc5f41
commit
e7603e6bfe
|
@ -20,41 +20,42 @@
|
||||||
#ifndef _BOINC_API_
|
#ifndef _BOINC_API_
|
||||||
#define _BOINC_API_
|
#define _BOINC_API_
|
||||||
|
|
||||||
#ifndef _WIN32
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <assert.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
#include "app_ipc.h"
|
#include "app_ipc.h"
|
||||||
|
|
||||||
/////////// API BEGINS HERE
|
/////////// API BEGINS HERE
|
||||||
|
|
||||||
extern int boinc_set_error(int exit_code);
|
extern "C" {
|
||||||
|
extern int boinc_set_error(int exit_code);
|
||||||
|
|
||||||
extern int boinc_init(bool standalone = false);
|
extern int boinc_init(bool standalone = false);
|
||||||
extern int boinc_finish(int);
|
extern int boinc_finish(int);
|
||||||
|
|
||||||
extern bool boinc_is_standalone();
|
extern bool boinc_is_standalone();
|
||||||
|
|
||||||
extern int boinc_resolve_filename(const char*, char*, int len);
|
extern int boinc_resolve_filename(const char*, char*, int len);
|
||||||
extern int boinc_resolve_filename(const char*, string&);
|
|
||||||
|
|
||||||
extern int boinc_parse_init_data_file();
|
extern int boinc_resolve_filename_s(const char*, string&);
|
||||||
extern int boinc_write_init_data_file();
|
|
||||||
extern int boinc_get_init_data(APP_INIT_DATA&);
|
|
||||||
|
|
||||||
extern int boinc_send_trickle_up(char*);
|
extern int boinc_parse_init_data_file();
|
||||||
extern bool boinc_receive_trickle_down(char* buf, int len);
|
extern int boinc_write_init_data_file();
|
||||||
|
extern int boinc_get_init_data(APP_INIT_DATA&);
|
||||||
|
|
||||||
extern bool boinc_time_to_checkpoint();
|
extern int boinc_send_trickle_up(char*);
|
||||||
extern int boinc_checkpoint_completed();
|
extern bool boinc_receive_trickle_down(char* buf, int len);
|
||||||
|
|
||||||
extern int boinc_fraction_done(double);
|
extern bool boinc_time_to_checkpoint();
|
||||||
|
extern int boinc_checkpoint_completed();
|
||||||
|
|
||||||
extern int boinc_wu_cpu_time(double&);
|
extern int boinc_fraction_done(double);
|
||||||
extern int boinc_thread_cpu_time(double&, double&);
|
|
||||||
|
extern int boinc_wu_cpu_time(double&);
|
||||||
|
extern int boinc_thread_cpu_time(double&, double&);
|
||||||
|
|
||||||
|
} // extern "C"
|
||||||
|
|
||||||
/////////// API ENDS HERE
|
/////////// API ENDS HERE
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,7 @@ int do_checkpoint(MFILE& mf, int nchars) {
|
||||||
|
|
||||||
retval = mf.flush();
|
retval = mf.flush();
|
||||||
if (retval) return retval;
|
if (retval) return retval;
|
||||||
boinc_resolve_filename(CHECKPOINT_FILE, resolved_name);
|
boinc_resolve_filename_s(CHECKPOINT_FILE, resolved_name);
|
||||||
retval = boinc_rename("temp", resolved_name.c_str());
|
retval = boinc_rename("temp", resolved_name.c_str());
|
||||||
if (retval) return retval;
|
if (retval) return retval;
|
||||||
|
|
||||||
|
@ -123,8 +123,8 @@ int main(int argc, char **argv) {
|
||||||
my_start_time = time(0);
|
my_start_time = time(0);
|
||||||
|
|
||||||
|
|
||||||
flags =
|
flags =
|
||||||
BOINC_DIAG_DUMPCALLSTACKENABLED |
|
BOINC_DIAG_DUMPCALLSTACKENABLED |
|
||||||
BOINC_DIAG_HEAPCHECKENABLED |
|
BOINC_DIAG_HEAPCHECKENABLED |
|
||||||
BOINC_DIAG_REDIRECTSTDERR;
|
BOINC_DIAG_REDIRECTSTDERR;
|
||||||
|
|
||||||
|
|
|
@ -12995,7 +12995,7 @@ Daniel June 3 2004
|
||||||
cs_files.C
|
cs_files.C
|
||||||
pers_file_xfer.C
|
pers_file_xfer.C
|
||||||
|
|
||||||
Karl 2004-04-04
|
Karl 2004-06-04
|
||||||
- start: fixed bug where Python 2.3.3 writes 'True' instead of '1' to
|
- start: fixed bug where Python 2.3.3 writes 'True' instead of '1' to
|
||||||
run_state.xml
|
run_state.xml
|
||||||
|
|
||||||
|
@ -13076,3 +13076,14 @@ David June 6 2004
|
||||||
client/
|
client/
|
||||||
client_state.C
|
client_state.C
|
||||||
pers_file_xfer.C,h
|
pers_file_xfer.C,h
|
||||||
|
|
||||||
|
Karl 2004-06-08
|
||||||
|
- changed BOINC api calls to extern "C" -- makes it easier to call from
|
||||||
|
other languages (Fortran)
|
||||||
|
|
||||||
|
api/
|
||||||
|
boinc_api.h
|
||||||
|
apps/
|
||||||
|
upper-case.C
|
||||||
|
lib/
|
||||||
|
app_ipc.C
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "boinc_api.h"
|
||||||
#include "parse.h"
|
#include "parse.h"
|
||||||
#include "error_numbers.h"
|
#include "error_numbers.h"
|
||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
@ -337,7 +338,7 @@ int boinc_resolve_filename(const char *virtual_name, char *physical_name, int le
|
||||||
|
|
||||||
// resolve XML soft link
|
// resolve XML soft link
|
||||||
//
|
//
|
||||||
int boinc_resolve_filename(const char *virtual_name, string& physical_name) {
|
int boinc_resolve_filename_s(const char *virtual_name, string& physical_name) {
|
||||||
|
|
||||||
physical_name = virtual_name;
|
physical_name = virtual_name;
|
||||||
// Open the file and load the first line
|
// Open the file and load the first line
|
||||||
|
|
Loading…
Reference in New Issue