mirror of https://github.com/BOINC/boinc.git
24 lines
420 B
C++
24 lines
420 B
C++
|
#include <stdio.h>
|
||
|
|
||
|
#ifdef _USING_FCGI_
|
||
|
#include "/usr/local/include/fcgi_stdio.h"
|
||
|
#endif
|
||
|
|
||
|
#include "shmem.h"
|
||
|
#include "sched_shmem.h"
|
||
|
|
||
|
int main() {
|
||
|
SCHED_SHMEM* ssp;
|
||
|
int retval;
|
||
|
void* p;
|
||
|
|
||
|
retval = attach_shmem(BOINC_KEY, &p);
|
||
|
if (retval) {
|
||
|
printf("can't attach shmem\n");
|
||
|
exit(1);
|
||
|
}
|
||
|
ssp = (SCHED_SHMEM*)p;
|
||
|
retval = ssp->verify();
|
||
|
printf("ready: %d\n", ssp->ready);
|
||
|
}
|