Skip to content

Instantly share code, notes, and snippets.

@deeev-sb
Created May 12, 2020 17:05
Show Gist options
  • Save deeev-sb/989104c656e2f2eb957422e1bac3e150 to your computer and use it in GitHub Desktop.
Save deeev-sb/989104c656e2f2eb957422e1bac3e150 to your computer and use it in GitHub Desktop.
/* 초기화된 condition variable을 이용해서 thread들간에 condition variable에 대한
signal을 주고 받는 작업을 수행하는 pthead 함수 3가지 : wait, signal, broadcast */
pthread_cond_wait (condition, mutex); // argument로 condition variable과 mutex를 받음
pthread_cond_signal (condition); // argument로 condition variable을 받음
pthread_cond_broadcast (condition); // argument로 condition variable을 받음
pthread_cond_t *condition
pthread_condattr_t *attr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment