Commit 63b05c9d authored by Zhou Wenjian's avatar Zhou Wenjian Committed by Masaki Tachibana
Browse files

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: default avatarZhou Wenjian <zhouwj.fi@gmail.com>
parent 38de12a4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment