#ifdef USE_PCH #include "pch.h" #else #include #include #include #include #include #include #include using namespace std; #include "sitecing/scoreboard.h" #endif namespace sitecing { scoreboard::scoreboard() : shmid(-1), slots(NULL) { shmid = shmget(IPC_PRIVATE,MAX_SITECING_SCOREBOARD_SLOTS*sizeof(scoreboard_slot),IPC_CREAT|0600); if(shmid<0) throw konforka::exception(CODEPOINT,"failed to shmget()"); slots = (scoreboard_slot*)shmat(shmid,NULL,0); if(shmctl(shmid,IPC_RMID,NULL)) throw konforka::exception(CODEPOINT,"failed to shmctl()"); if(!slots) throw konforka::exception(CODEPOINT,"failed to shmat()"); for(int tmp=0;tmp=0 && slot=0 && slot