summaryrefslogtreecommitdiffstats
path: root/runtime/transport/procfs.c
diff options
context:
space:
mode:
authorhunt <hunt>2005-11-30 08:38:13 +0000
committerhunt <hunt>2005-11-30 08:38:13 +0000
commit1296e5e2c706c3ff7858bd2903dcd76c3547d31b (patch)
tree25c56fb79edd476aa003757d63511520546653a2 /runtime/transport/procfs.c
parent4cc73b3da4778a8189ddbf798403ee59dbbe6ae6 (diff)
downloadsystemtap-steved-1296e5e2c706c3ff7858bd2903dcd76c3547d31b.tar.gz
systemtap-steved-1296e5e2c706c3ff7858bd2903dcd76c3547d31b.tar.xz
systemtap-steved-1296e5e2c706c3ff7858bd2903dcd76c3547d31b.zip
2005-11-30 Martin Hunt <hunt@redhat.com>
* transport.h (STP_WORK_TIMER): Declare. * transport.c (_stp_work_queue): Wake up every STP_WORK_QUEUE jiffies and check IO and exit status. (_stp_handle_exit): Deleted. * procfs.c (_stp_proc_write_cmd): Just set exit flag on STP_EXIT. (_stp_write): Don't call wake_up_interruptible.
Diffstat (limited to 'runtime/transport/procfs.c')
-rw-r--r--runtime/transport/procfs.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/runtime/transport/procfs.c b/runtime/transport/procfs.c
index 7bba3033..7db6e658 100644
--- a/runtime/transport/procfs.c
+++ b/runtime/transport/procfs.c
@@ -93,10 +93,7 @@ static ssize_t _stp_proc_write_cmd (struct file *file, const char __user *buf,
break;
}
case STP_EXIT:
- /* Cannot call _stp_handle_exit() directly here */
- /* because the buffers may be full and stpd won't be able */
- /* to empty them until this handler returns. */
- schedule_work (&stp_exit);
+ _stp_exit_flag = 1;
break;
case STP_TRANSPORT_INFO:
{
@@ -160,15 +157,11 @@ static int _stp_write (int type, void *data, int len)
memcpy (bptr->buf, data, len);
bptr->len = len;
-
/* put it on the pool of ready buffers */
spin_lock(&_stp_ready_lock);
list_add_tail(&bptr->list, &_stp_ready_q);
spin_unlock(&_stp_ready_lock);
- /* now wake up readers */
- wake_up_interruptible(&_stp_proc_wq);
-
return len;
}
@@ -236,7 +229,7 @@ static int _stp_set_buffers(int num)
int i;
struct list_head *p;
- printk("stp_set_buffers %d\n", num);
+ //printk("stp_set_buffers %d\n", num);
if (num == 0 || num == _stp_current_buffers)
return _stp_current_buffers;