修改线程获取缓冲区失败问题。
修改共享内存地址映射失败时的判错条件,shmat失败会返回(void *)-1而不是NULL
This commit is contained in:
@@ -529,7 +529,8 @@ int main(int argc, char **argv)
|
||||
}
|
||||
if(ring_queue_head[i] == NULL){
|
||||
ring_queue_head[i] = shmat(tmp_ovw->shmid, NULL, 0);
|
||||
if(ring_queue_head[i] == NULL){
|
||||
if(ring_queue_head[i] == (struct MESA_shm_queue_head *)-1){
|
||||
ring_queue_head[i] = NULL;
|
||||
break ;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user