kernels/linux-2.4.0/mm/filemap.c
/* 
 * Wait for a page to get unlocked.
 *
 * This must be called with the caller "holding" the page,
 * ie with increased "page->count" so that the page won't
 * go away during the wait..
 */
Wait for a page to get unlocked.
This must be called with the caller "holding" the page,
ie with increased "page->count" so that the page won't
go away during the wait
Wait for a page to get unlocked . This must be called with the caller " holding " the page ie with increased " page - > count " so that the page won ' t go away during the wait
void ___wait_on_page(struct page *page)
{
	struct task_struct *tsk = current;
	DECLARE_WAITQUEUE(wait, tsk);
	add_wait_queue(&page->wait, &wait);
	do {
		sync_page(page);
		set_task_state(tsk, TASK_UNINTERRUPTIBLE);
		if (!PageLocked(page))
			break;
		run_task_queue(&tq_disk);
		schedule();
	} while (PageLocked(page));
	tsk->state = TASK_RUNNING;
	remove_wait_queue(&page->wait, &wait);
}
void ___wait_on_page ( struct page * page ) { struct task_struct * tsk = current ; DECLARE_WAITQUEUE ( wait , tsk ) ; add_wait_queue ( & page -> wait , & wait ) ; do { sync_page ( page ) ; set_task_state ( tsk , TASK_UNINTERRUPTIBLE ) ; if ( ! PageLocked ( page ) ) break ; run_task_queue ( & tq_disk ) ; schedule ( ) ; } while ( PageLocked ( page ) ) ; tsk -> state = TASK_RUNNING ; remove_wait_queue ( & page -> wait , & wait ) ; }
Wait for a page to get unlocked.
Wait for a page to get unlocked .