Skip to content
Snippets Groups Projects
Commit b1f77b90 authored by Tom's avatar Tom
Browse files

syscall from kernel fix attempt

parent 36a1c72e
Branches
No related tags found
No related merge requests found
......@@ -81,7 +81,16 @@ void overflow_handler(int signum,siginfo_t *oh, void *blah) {
}
int perf_event_open(struct perf_event_attr *hw_event_uptr, pid_t pid, int cpu, int group_fd, unsigned long flags) {
mm_segment_t fs;
int ret;
return syscall(__NR_perf_event_open,hw_event_uptr, pid, cpu,
group_fd, flags);
fs = get_fs(); /* save previous value */
set_fs (get_ds()); /* use kernel limit */
ret = syscall(__NR_perf_event_open,hw_event_uptr, pid, cpu, group_fd, flags);
set_fs(fs);
return ret;
}
......@@ -5,7 +5,8 @@
#include "sched.h"
#include <linux/signal.h>
#include <linux/ioctl.h>
#include <stdio.h>
#include <linux/fs.h>
//#include <include/linux/smp.h>
#endif
......
......@@ -19,7 +19,7 @@
* an explicit wake_up. The return value from schedule_timeout
* can be used instead; if 0, the wakeup was due to the timeout.
*
* Rob Riggs Added persistent DMA buffers (1998/10/17)
* Rob Riggs Added persistent DMA buffers (1998/10/17)#include <asm/segment.h>
*/
#define BE_CONSERVATIVE
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment