- validator: add a global variable WORKUNIT* g_wup;

that points to the workunit being processed;
    you can use this in your init_result(), compare_result() etc.
    if you need it.

svn path=/trunk/boinc/; revision=15919
This commit is contained in:
David Anderson 2008-08-21 20:58:32 +00:00
parent 6db70de2d8
commit 1013cf02c5
4 changed files with 20 additions and 3 deletions

View File

@ -6971,3 +6971,13 @@ Rom 21 Aug 2008
/
configure.ac
version.h
David 21 Aug 2008
- validator: add a global variable WORKUNIT* g_wup;
that points to the workunit being processed;
you can use this in your init_result(), compare_result() etc.
if you need it.
sched/
main.C
validator.C,h

View File

@ -57,7 +57,6 @@
#define DELAY_MAX (2*86400)
// maximum delay request
extern SCHED_CONFIG config;
extern GUI_URLS gui_urls;
extern PROJECT_FILES project_files;
extern key_t sema_key;

View File

@ -50,6 +50,7 @@ using namespace std;
#include "sched_config.h"
#include "sched_util.h"
#include "sched_msgs.h"
#include "validator.h"
#include "validate_util.h"
#define LOCKFILE "validate.out"
@ -87,6 +88,7 @@ bool grant_claimed_credit = false;
bool update_credited_job = false;
bool credit_from_wu = false;
bool simulation = false;
WORKUNIT* g_wup;
void signal_handler(int) {
log_messages.printf(MSG_NORMAL, "Signaled by simulator\n");
@ -283,6 +285,7 @@ int handle_wu(
unsigned int i;
WORKUNIT& wu = items[0].wu;
g_wup = &wu;
if (wu.canonical_resultid) {
log_messages.printf(MSG_NORMAL,

View File

@ -17,8 +17,13 @@
#include "sched_config.h"
extern SCHED_CONFIG config;
extern double max_granted_credit;
// the -max_granted_credit cmdline arg, or 0
extern double max_claimed_credit;
// the -max_claimed_credit cmdline arg, or 0
extern bool grant_claimed_credit;
// the -grant_claimed_credit cmdline arg, or false
extern WORKUNIT* g_wup;
// A pointer to the WU currently being processed;
// you can use this in your init_result() etc. functions