Skip to content

Commit

Permalink
some corrections on comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rong1129 committed Mar 3, 2012
1 parent 861dc1e commit 5f51ca3
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions module/new/binder.c
Original file line number Diff line number Diff line change
Expand Up @@ -730,8 +730,6 @@ static void thread_queue_release(struct msg_queue *q, void *data)
spin_unlock(&proc->lock);

kfree(thread);

// this has to be the last step as the last proc queue user will destroy the proc
put_msg_queue(proc->queue);
}

Expand Down Expand Up @@ -1774,10 +1772,8 @@ static long bcmd_read_dead_reply(struct binder_proc *proc, struct binder_thread
if (size < sizeof(cmd))
return -ENOSPC;

if (thread->pending_replies > 0) {
if (thread->pending_replies > 0)
thread->pending_replies--;
//TODO: wakeup
}

if (put_user(cmd, (uint32_t *)buf))
return -EFAULT;
Expand Down Expand Up @@ -2150,8 +2146,7 @@ static unsigned int binder_poll(struct file *filp, poll_table *p)
msg_queue_poll_wait_read(thread->queue, filp, p);

if (thread->last_error ||
!msg_queue_empty(thread->queue) ||
(thread->pending_replies < 1 && msg_queue_size(proc->queue) > 0))
!msg_queue_empty(thread->queue) || (msg_queue_size(proc->queue) > 0))
return POLLIN | POLLRDNORM;

// TODO: consider POLLOUT case as write can block too (not compat)
Expand Down Expand Up @@ -2198,7 +2193,7 @@ static int binder_mmap(struct file *filp, struct vm_area_struct *vma)
if (proc->ustart || proc->slob) // TODO: free existing slob?
return -EBUSY;

/* compat: sericemanager has a map size of 128K and the rest uses (1024-2)k */
/* compat: sericemanager has a map size of 128K and the rest uses (1024-8)k */
if (size < 512 * 1024)
proc->slob = fast_slob_create(size, 16 * 1024, 4, 2);
else
Expand Down

0 comments on commit 5f51ca3

Please sign in to comment.