~ubuntu-branches/ubuntu/oneiric/boinc/oneiric

« back to all changes in this revision

Viewing changes to sched/sched_util.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Steffen Moeller
  • Date: 2011-04-27 22:33:56 UTC
  • mfrom: (1.1.18 upstream) (6.2.14 sid)
  • Revision ID: james.westby@ubuntu.com-20110427223356-2jyajtfxd5htgwsd
Tags: 6.12.26+dfsg-1
New upstream version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
202
202
    return 0;
203
203
}
204
204
 
205
 
// Locality scheduling: get filename from result name
206
 
//
207
 
 
208
 
int extract_filename(char* in, char* out) {
209
 
    strcpy(out, in);
210
 
    char* p = strstr(out, "__");
211
 
    if (!p) return -1;
212
 
    *p = 0;
213
 
    return 0;
214
 
}
215
 
 
216
205
void compute_avg_turnaround(HOST& host, double turnaround) {
217
206
    double new_avg;
218
207
    if (host.avg_turnaround == 0) {
270
259
 
271
260
}
272
261
 
 
262
bool is_arg(const char* x, const char* y) {
 
263
    char buf[256];
 
264
    strcpy(buf, "--");
 
265
    strcat(buf, y);
 
266
    if (!strcmp(buf, x)) return true;
 
267
    if (!strcmp(buf+1, x)) return true;
 
268
    return false;
 
269
}
 
270
 
273
271
#ifdef GCL_SIMULATOR
274
272
 
275
273
void simulator_signal_handler(int signum){    
308
306
 
309
307
#endif
310
308
 
311
 
const char *BOINC_RCSID_affa6ef1e4 = "$Id: sched_util.cpp 18825 2009-08-10 04:49:02Z davea $";
 
309
const char *BOINC_RCSID_affa6ef1e4 = "$Id: sched_util.cpp 21181 2010-04-15 03:13:56Z davea $";