Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/librumpuser missed part of earlier commit



details:   https://anonhg.NetBSD.org/src/rev/e89bbce42480
branches:  trunk
changeset: 759011:e89bbce42480
user:      pooka <pooka%NetBSD.org@localhost>
date:      Wed Nov 24 14:32:42 2010 +0000

description:
missed part of earlier commit

diffstat:

 lib/librumpuser/sp_common.c |  9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diffs (34 lines):

diff -r a37809a8bd8b -r e89bbce42480 lib/librumpuser/sp_common.c
--- a/lib/librumpuser/sp_common.c       Wed Nov 24 13:54:49 2010 +0000
+++ b/lib/librumpuser/sp_common.c       Wed Nov 24 14:32:42 2010 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: sp_common.c,v 1.6 2010/11/19 17:09:44 pooka Exp $     */
+/*      $NetBSD: sp_common.c,v 1.7 2010/11/24 14:32:42 pooka Exp $     */
 
 /*
  * Copyright (c) 2010 Antti Kantee.  All Rights Reserved.
@@ -117,11 +117,14 @@
 
 struct spclient {
        int spc_fd;
+       int spc_refcnt;
+       int spc_dying;
 
        struct lwp *spc_mainlwp;
        pid_t spc_pid;
 
-       /* incoming */
+       struct pollfd *spc_pfd;
+
        struct rsp_hdr spc_hdr;
        uint8_t *spc_buf;
        size_t spc_off;
@@ -256,7 +259,7 @@
        int rv = 0;
 
        pthread_mutex_lock(&spc->spc_mtx);
-       while (rw->rw_data == NULL) {
+       while (rw->rw_data == NULL && spc->spc_dying == 0) {
                /* are we free to receive? */
                if (spc->spc_istatus == SPCSTATUS_FREE) {
                        int gotresp;



Home | Main Index | Thread Index | Old Index