This contains my bachelors thesis and associated tex files, code snippets and maybe more. Topic: Data Movement in Heterogeneous Memories with Intel Data Streaming Accelerator
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.3 KiB

  1. /* Notes */ /*{{{C}}}*//*{{{*/
  2. /*
  3. This file is free software; as a special exception the author gives
  4. unlimited permission to copy and/or distribute it, with or without
  5. modifications, as long as this notice is preserved.
  6. This program is distributed in the hope that it will be useful, but
  7. WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
  8. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  9. */
  10. /*}}}*/
  11. /* #includes *//*{{{*/
  12. #ifndef NO_POSIX_SOURCE
  13. #undef _POSIX_SOURCE
  14. #define _POSIX_SOURCE 1
  15. #undef _POSIX_C_SOURCE
  16. #define _POSIX_C_SOURCE 2
  17. #endif
  18. #ifdef DMALLOC
  19. #include "dmalloc.h"
  20. #endif
  21. #include <sys/types.h>
  22. #include <assert.h>
  23. #include <errno.h>
  24. #include <stdio.h>
  25. #include <stdlib.h>
  26. #include <string.h>
  27. #include <pwd.h>
  28. #include <unistd.h>
  29. #include "config.h"
  30. #include "misc.h"
  31. /*}}}*/
  32. #ifdef BROKEN_REALLOC
  33. /* myrealloc -- ANSI conforming realloc() */ /*{{{*/
  34. #undef realloc
  35. void *myrealloc(void *p, size_t n)
  36. {
  37. return (p==(void*)0 ? malloc(n) : realloc(p,n));
  38. }
  39. /*}}}*/
  40. #endif
  41. #ifndef HAVE_STRERROR
  42. /* strerror -- ANSI strerror */ /*{{{*/
  43. extern int sys_nerr;
  44. extern char *sys_errlist[];
  45. char *strerror(int errno)
  46. {
  47. assert(errno>=0);
  48. assert(errno<sys_nerr);
  49. return sys_errlist[errno];
  50. }
  51. /*}}}*/
  52. #endif