#include <asm/types.h>
/* Get the next sub buffer that can be read. */
-#define RELAY_GET_SUBBUF _IOR(0xF4, 0x00,__u32)
+#define RELAY_GET_SUBBUF _IOR(0xF5, 0x00,__u32)
/* Release the oldest reserved (by "get") sub buffer. */
-#define RELAY_PUT_SUBBUF _IOW(0xF4, 0x01,__u32)
+#define RELAY_PUT_SUBBUF _IOW(0xF5, 0x01,__u32)
/* returns the number of sub buffers in the per cpu channel. */
-#define RELAY_GET_N_SUBBUFS _IOR(0xF4, 0x02,__u32)
+#define RELAY_GET_N_SUBBUFS _IOR(0xF5, 0x02,__u32)
/* returns the size of the sub buffers. */
-#define RELAY_GET_SUBBUF_SIZE _IOR(0xF4, 0x03,__u32)
+#define RELAY_GET_SUBBUF_SIZE _IOR(0xF5, 0x03,__u32)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,14)
#include <linux/inotify.h>
return (void*)ret;
}
-
int main(int argc, char ** argv)
{
int ret = 0;
sigaction(SIGQUIT, &act, NULL);
sigaction(SIGINT, &act, NULL);
-
tids = malloc(sizeof(pthread_t) * num_threads);
for(i=0; i<num_threads; i++) {
+
ret = pthread_create(&tids[i], NULL, thread_main, (void*)i);
if(ret) {
perror("Error creating thread");