|
pthread_create(&thread[j][i],NULL,change,&a_pos[j][i]);
} //쓰레드 생성
}
for(j=0;j<N;j++){
for(i=0;i<N;i++){
pthread_join(thread[j][i],(void *)&status); //조인
}
}
for(j=0;j<N;j++){
for(i=0;i<N;i++){
life_game_data[j][i] = data_temp[j][i]; //원본배열에 임시배열복사
}
}
erase(); //화면
|
- 페이지 6페이지
- 가격 1,000원
- 등록일 2007.09.10
- 파일종류 한글(hwp)
- 참고문헌 없음
- 최근 2주 판매 이력 없음
|
|
Linux Kernel의 스케줄링으로 여러 Thread가 실행될 수 있다.
3.2 소스 코드 - philosopher()부분만 기재
int g_index=0;
void *philosopher(void *arg)
{
int left,right;
int id=g_id++;
int spa=0, loop=1;
while(loop)
{
left=right=0;
while(pthread_mutex_trylock(mutexChopstick+g_index))
g_index=(++g_inde
|
- 페이지 5페이지
- 가격 0원
- 등록일 2008.07.09
- 파일종류 한글(hwp)
- 참고문헌 없음
- 최근 2주 판매 이력 없음
|
|
← 자원 관련 정보 ■ 개요(Overview)
■ 다중 쓰레드 모델(Multithreading Models)
■ 쓰레드와 관련된 문제들(Threading Issues)
■ 쓰레드 라이브러리(Thread Library)
● Pthreads
● Windows XP Threads
● Linux Threads
● Java Threads
|
- 페이지 53페이지
- 가격 12,600원
- 등록일 2012.10.19
- 파일종류 피피티(ppt)
- 참고문헌 없음
- 최근 2주 판매 이력 없음
|
|
//////////////////////// Application ////////////////////////
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
////////// MAPDATA
#define ROW 103 // +1('\n')
#define C
|
- 페이지 1페이지
- 가격 1,000원
- 등록일 2006.06.30
- 파일종류 압축파일
- 참고문헌 없음
- 최근 2주 판매 이력 없음
|
|
= 0; t_cnt < a; t_cnt++)//쓰레드 생성을 위한 for문
{
// 쓰레드를 생성한다.
if (pthread_create(&thread_t[t_cnt], NULL, test, (void *)&t_cnt) < 0)
{
perror("thread create error:");//쓰레드 생성 에러시
exit(0);
}
pthread_join(thread_t[t_cnt],(void*)&status);
}
return 0;
} 없음
|
- 페이지 4페이지
- 가격 1,000원
- 등록일 2011.01.10
- 파일종류 한글(hwp)
- 참고문헌 없음
- 최근 2주 판매 이력 없음
|