Advertisement
Guest User

Untitled

a guest
Jun 18th, 2019
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <stdlib.h>
  4. #include <arpa/inet.h>
  5. #include <sys/socket.h>
  6. #include <sys/time.h>
  7. #include <unistd.h>
  8.  
  9. /*XENOMAI*/
  10. #include "task.h"
  11. #include <rtdm/rtdm.h>
  12. #include <asm/ioctl.h>
  13.  
  14. #define SERVER "192.168.127.10"
  15. #define BUFLEN 512
  16. #define PORT 8888
  17.  
  18. void die(char *s)
  19. {
  20. perror(s);
  21. exit(1);
  22. }
  23.  
  24. #ifndef _XENO_TASK_H
  25. #define _XENO_TASK_H
  26.  
  27. #include <nucleus/sched.h>
  28. #include <native/types.h>
  29.  
  30. /* Creation flags. */
  31. #define T_FPU XNFPU
  32. #define T_SUSP XNSUSP
  33. /* <!> High bits must not conflict with XNFPU|XNSHADOW|XNSUSP. */
  34. #define T_CPU(cpu) (1 << (24 + (cpu & 7))) /* Up to 8 cpus [0-7] */
  35. #define T_CPUMASK 0xff000000
  36.  
  37. #ifndef _RTDM_H
  38. #define _RTDM_H
  39.  
  40. #ifdef __KERNEL__
  41.  
  42. #include <linux/types.h>
  43. #include <linux/fcntl.h>
  44. #include <linux/ioctl.h>
  45. #include <linux/sched.h>
  46. #include <linux/socket.h>
  47.  
  48. typedef u32 socklen_t;
  49. typedef struct task_struct rtdm_user_info_t;
  50.  
  51. #else /* !__KERNEL__ */
  52.  
  53. #include <fcntl.h>
  54. #include <stddef.h>
  55. #include <stdint.h>
  56. #include <sys/ioctl.h>
  57. #include <sys/socket.h>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement