makedumpfile: Fix a bug when multi-threads feature meets enospace
Currently, when multi-threads feature meets enospace error,
the main thread will call pthread_join(). However, there is one
thread doing while{} and won't stop.
pthread_mutex_lock(&info->page_data_mutex);
while (page_data_buf[index].used != FALSE) {
index = (index + 1) % info->num_buffers;
}
page_data_buf[index].used = TRUE;
pthread_mutex_unlock(&info->page_data_mutex);
Then makedumpfile hangs.
This patch add a cancel point in while{}.
Signed-off-by:
Zhou Wenjian <zhouwj.fi@gmail.com>
Loading
Please sign in to comment