|
@@ -319,14 +319,14 @@ EXPORT_SYMBOL(wake_bit_function);
|
|
*/
|
|
*/
|
|
int __sched
|
|
int __sched
|
|
__wait_on_bit(wait_queue_head_t *wq, struct wait_bit_queue *q,
|
|
__wait_on_bit(wait_queue_head_t *wq, struct wait_bit_queue *q,
|
|
- int (*action)(void *), unsigned mode)
|
|
|
|
|
|
+ wait_bit_action_f *action, unsigned mode)
|
|
{
|
|
{
|
|
int ret = 0;
|
|
int ret = 0;
|
|
|
|
|
|
do {
|
|
do {
|
|
prepare_to_wait(wq, &q->wait, mode);
|
|
prepare_to_wait(wq, &q->wait, mode);
|
|
if (test_bit(q->key.bit_nr, q->key.flags))
|
|
if (test_bit(q->key.bit_nr, q->key.flags))
|
|
- ret = (*action)(q->key.flags);
|
|
|
|
|
|
+ ret = (*action)(&q->key);
|
|
} while (test_bit(q->key.bit_nr, q->key.flags) && !ret);
|
|
} while (test_bit(q->key.bit_nr, q->key.flags) && !ret);
|
|
finish_wait(wq, &q->wait);
|
|
finish_wait(wq, &q->wait);
|
|
return ret;
|
|
return ret;
|
|
@@ -334,7 +334,7 @@ __wait_on_bit(wait_queue_head_t *wq, struct wait_bit_queue *q,
|
|
EXPORT_SYMBOL(__wait_on_bit);
|
|
EXPORT_SYMBOL(__wait_on_bit);
|
|
|
|
|
|
int __sched out_of_line_wait_on_bit(void *word, int bit,
|
|
int __sched out_of_line_wait_on_bit(void *word, int bit,
|
|
- int (*action)(void *), unsigned mode)
|
|
|
|
|
|
+ wait_bit_action_f *action, unsigned mode)
|
|
{
|
|
{
|
|
wait_queue_head_t *wq = bit_waitqueue(word, bit);
|
|
wait_queue_head_t *wq = bit_waitqueue(word, bit);
|
|
DEFINE_WAIT_BIT(wait, word, bit);
|
|
DEFINE_WAIT_BIT(wait, word, bit);
|
|
@@ -345,7 +345,7 @@ EXPORT_SYMBOL(out_of_line_wait_on_bit);
|
|
|
|
|
|
int __sched
|
|
int __sched
|
|
__wait_on_bit_lock(wait_queue_head_t *wq, struct wait_bit_queue *q,
|
|
__wait_on_bit_lock(wait_queue_head_t *wq, struct wait_bit_queue *q,
|
|
- int (*action)(void *), unsigned mode)
|
|
|
|
|
|
+ wait_bit_action_f *action, unsigned mode)
|
|
{
|
|
{
|
|
do {
|
|
do {
|
|
int ret;
|
|
int ret;
|
|
@@ -353,7 +353,7 @@ __wait_on_bit_lock(wait_queue_head_t *wq, struct wait_bit_queue *q,
|
|
prepare_to_wait_exclusive(wq, &q->wait, mode);
|
|
prepare_to_wait_exclusive(wq, &q->wait, mode);
|
|
if (!test_bit(q->key.bit_nr, q->key.flags))
|
|
if (!test_bit(q->key.bit_nr, q->key.flags))
|
|
continue;
|
|
continue;
|
|
- ret = action(q->key.flags);
|
|
|
|
|
|
+ ret = action(&q->key);
|
|
if (!ret)
|
|
if (!ret)
|
|
continue;
|
|
continue;
|
|
abort_exclusive_wait(wq, &q->wait, mode, &q->key);
|
|
abort_exclusive_wait(wq, &q->wait, mode, &q->key);
|
|
@@ -365,7 +365,7 @@ __wait_on_bit_lock(wait_queue_head_t *wq, struct wait_bit_queue *q,
|
|
EXPORT_SYMBOL(__wait_on_bit_lock);
|
|
EXPORT_SYMBOL(__wait_on_bit_lock);
|
|
|
|
|
|
int __sched out_of_line_wait_on_bit_lock(void *word, int bit,
|
|
int __sched out_of_line_wait_on_bit_lock(void *word, int bit,
|
|
- int (*action)(void *), unsigned mode)
|
|
|
|
|
|
+ wait_bit_action_f *action, unsigned mode)
|
|
{
|
|
{
|
|
wait_queue_head_t *wq = bit_waitqueue(word, bit);
|
|
wait_queue_head_t *wq = bit_waitqueue(word, bit);
|
|
DEFINE_WAIT_BIT(wait, word, bit);
|
|
DEFINE_WAIT_BIT(wait, word, bit);
|
|
@@ -503,7 +503,7 @@ void wake_up_atomic_t(atomic_t *p)
|
|
}
|
|
}
|
|
EXPORT_SYMBOL(wake_up_atomic_t);
|
|
EXPORT_SYMBOL(wake_up_atomic_t);
|
|
|
|
|
|
-__sched int bit_wait(void *word)
|
|
|
|
|
|
+__sched int bit_wait(struct wait_bit_key *word)
|
|
{
|
|
{
|
|
if (signal_pending_state(current->state, current))
|
|
if (signal_pending_state(current->state, current))
|
|
return 1;
|
|
return 1;
|
|
@@ -512,7 +512,7 @@ __sched int bit_wait(void *word)
|
|
}
|
|
}
|
|
EXPORT_SYMBOL(bit_wait);
|
|
EXPORT_SYMBOL(bit_wait);
|
|
|
|
|
|
-__sched int bit_wait_io(void *word)
|
|
|
|
|
|
+__sched int bit_wait_io(struct wait_bit_key *word)
|
|
{
|
|
{
|
|
if (signal_pending_state(current->state, current))
|
|
if (signal_pending_state(current->state, current))
|
|
return 1;
|
|
return 1;
|