* The function returns 0 if the elapsed, and the remaining * wait_event_timeout - sleep until a condition gets true or a timeout elapses #define _wait_event_timeout(wq, condition, ret) \ * change the result of the wait condition. * wake_up() has to be called after changing any variable that could * The process is put to sleep (TASK_UNINTERRUPTIBLE) until the * a C expression for the event to wait for * wait_event - sleep until a condition gets true Prepare_to_wait(&wq, &_wait, TASK_UNINTERRUPTIBLE) \ * * kernel/mutex.c * * Mutexes: blocking mutual exclusion locks * * Started by Ingo Molnar: * * Copyright (C) 2004, 2005, 2006 Red Hat, Inc., Ingo Molnar * * Many thanks to Arjan van de Ven, Thomas Gleixner, Steven Rostedt and * David Howells for suggesti Mutex.c - kernel/mutex.c - Linux source code (v2.6.39.4) - Bootlin _mutex_lock_common(lock, TASK_UNINTERRUPTIBLE, 0, _RET_IP_) Struct mutex *lock = container_of(lock_count, struct mutex, count) _mutex_lock_slowpath(atomic_t *lock_count) _mutex_lock_common(lock, TASK_UNINTERRUPTIBLE, subclass, _RET_IP_) Mutex_lock_nested(struct mutex *lock, unsigned int subclass) Return sleep_on_common(q, TASK_UNINTERRUPTIBLE, timeout) Sleep_on_common(q, TASK_UNINTERRUPTIBLE, MAX_SCHEDULE_TIMEOUT) Ģ] sleep_on_timeout() 함수 long _sched sleep_on_timeout(wait_queue_head_t *q, long timeout) ġ] sleep_on() 함수 void _sched sleep_on(wait_queue_head_t *q) * * kernel/sched.c * * Kernel scheduler and related syscalls * * Copyright (C) 1991-2002 Linus Torvalds * * Modified by Dave Grothe to fix bugs in semaphores and * make semaphores SMP safe * Implemented schedule_timeout() and related Sched.c - kernel/sched.c - Linux source code (v2.6.39.4) - Bootlin Return wait_for_common(x, timeout, TASK_UNINTERRUPTIBLE) ĮXPORT_SYMBOL(wait_for_completion_timeout) Wait_for_completion_timeout(struct completion *x, unsigned long timeout) * This waits for either a completion of a specific task to be signaled or for a ![]() ![]() * wait_for_completion_timeout: - waits for completion of a task (w/timeout) Wait_for_common(x, MAX_SCHEDULE_TIMEOUT, TASK_UNINTERRUPTIBLE) Void _sched wait_for_completion(struct completion *x) ![]() wait_for_completion_timeout()) with timeout ![]() * This waits to be signaled for completion of a specific task. * holds the state of this particular completion * wait_for_completion: - waits for completion of a task (5) schedule_timeout_uninterruptible() 함수 io_wait_event() mutex_lock() usleep_range() msleep() wait_for_completion() io_wait_eve
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |