Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 263517
b: refs/heads/master
c: e5842cd
h: refs/heads/master
i:
  263515: 64900d2
v: v3
  • Loading branch information
Peter Hurley authored and Gustavo F. Padovan committed Aug 11, 2011
1 parent a9094dd commit bf1417d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8e7c3d2e4ba18ee4cdcc1f89aec944fbff4ce735
refs/heads/master: e5842cdb0f4f2c68f6acd39e286e5d10d8c073e8
17 changes: 7 additions & 10 deletions trunk/net/bluetooth/rfcomm/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ static DEFINE_MUTEX(rfcomm_mutex);
#define rfcomm_lock() mutex_lock(&rfcomm_mutex)
#define rfcomm_unlock() mutex_unlock(&rfcomm_mutex)

static unsigned long rfcomm_event;

static LIST_HEAD(session_list);

Expand Down Expand Up @@ -120,7 +119,6 @@ static inline void rfcomm_schedule(void)
{
if (!rfcomm_thread)
return;
set_bit(RFCOMM_SCHED_WAKEUP, &rfcomm_event);
wake_up_process(rfcomm_thread);
}

Expand Down Expand Up @@ -2038,19 +2036,18 @@ static int rfcomm_run(void *unused)

rfcomm_add_listener(BDADDR_ANY);

while (!kthread_should_stop()) {
while (1) {
set_current_state(TASK_INTERRUPTIBLE);
if (!test_bit(RFCOMM_SCHED_WAKEUP, &rfcomm_event)) {
/* No pending events. Let's sleep.
* Incoming connections and data will wake us up. */
schedule();
}
set_current_state(TASK_RUNNING);

if (kthread_should_stop())
break;

/* Process stuff */
clear_bit(RFCOMM_SCHED_WAKEUP, &rfcomm_event);
rfcomm_process_sessions();

schedule();
}
__set_current_state(TASK_RUNNING);

rfcomm_kill_listener();

Expand Down

0 comments on commit bf1417d

Please sign in to comment.