Skip to content

Instantly share code, notes, and snippets.

@nietaki
Created December 20, 2010 18:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nietaki/748725 to your computer and use it in GitHub Desktop.
Save nietaki/748725 to your computer and use it in GitHub Desktop.
int intSnd(int qid, int type, int msg){
int ret;
struct intmsgbuf in;
in.mtype = type;
in.mtext[0] = msg;
ret = msgsnd(qid, &in, sizeof(int), SND_MSG_FLAG);
if(ret == -1){
syserr("msgsnd");
}
return ret;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment