2002-06-01 20:26:21 +00:00
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#include "shmem.h"
|
|
|
|
#include "sched_shmem.h"
|
|
|
|
|
|
|
|
int main() {
|
|
|
|
SCHED_SHMEM* ssp;
|
2002-08-29 04:08:40 +00:00
|
|
|
int retval, i;
|
2002-06-01 20:26:21 +00:00
|
|
|
void* p;
|
|
|
|
|
2002-08-25 07:54:33 +00:00
|
|
|
retval = attach_shmem(BOINC_SHMEM_KEY, &p);
|
2002-06-01 20:26:21 +00:00
|
|
|
if (retval) {
|
|
|
|
printf("can't attach shmem\n");
|
|
|
|
exit(1);
|
|
|
|
}
|
|
|
|
ssp = (SCHED_SHMEM*)p;
|
|
|
|
retval = ssp->verify();
|
|
|
|
printf("ready: %d\n", ssp->ready);
|
2002-08-29 04:08:40 +00:00
|
|
|
for (i=0; i<ssp->max_wu_results; i++) {
|
|
|
|
printf("%d. %s\n", i, ssp->wu_results[i].present?"present":"absent");
|
|
|
|
}
|
2002-06-01 20:26:21 +00:00
|
|
|
}
|