100-compat.patch 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. Index: lib_ifxos-1.5.14/configure.in
  2. ===================================================================
  3. --- lib_ifxos-1.5.14.orig/configure.in 2010-07-22 18:34:07.000000000 +0200
  4. +++ lib_ifxos-1.5.14/configure.in 2013-03-14 08:23:57.481810836 +0100
  5. @@ -64,7 +64,7 @@
  6. AC_ARG_ENABLE(kernelbuild,
  7. AS_HELP_STRING(--enable-kernelbuild=x,Set the target kernel build path (only for kernel 2.6.x)),
  8. [
  9. - if test -e $enableval/include/linux/autoconf.h; then
  10. + if test -e $enableval/include/linux/autoconf.h -o -e $enableval/include/generated/autoconf.h; then
  11. AC_SUBST([KERNEL_BUILD_PATH],[$enableval])
  12. else
  13. AC_MSG_ERROR([The kernel build directory is not valid or not configured!])
  14. Index: lib_ifxos-1.5.14/src/linux/ifxos_linux_thread_drv.c
  15. ===================================================================
  16. --- lib_ifxos-1.5.14.orig/src/linux/ifxos_linux_thread_drv.c 2010-01-08 18:10:47.000000000 +0100
  17. +++ lib_ifxos-1.5.14/src/linux/ifxos_linux_thread_drv.c 2013-03-14 08:23:57.481810836 +0100
  18. @@ -34,8 +34,8 @@
  19. #include <linux/sched.h>
  20. #include <linux/version.h>
  21. #include <linux/completion.h>
  22. -#include <linux/smp_lock.h>
  23. #include <linux/signal.h>
  24. +#include <linux/kthread.h>
  25. #include "ifx_types.h"
  26. @@ -68,10 +68,6 @@
  27. #if ( defined(IFXOS_HAVE_THREAD) && (IFXOS_HAVE_THREAD == 1) )
  28. -IFXOS_STATIC IFX_int32_t IFXOS_KernelThreadStartup(
  29. - IFXOS_ThreadCtrl_t *pThrCntrl);
  30. -
  31. -
  32. /* ============================================================================
  33. IFX Linux adaptation - Kernel Thread handling
  34. ========================================================================= */
  35. @@ -96,9 +92,9 @@
  36. - IFX_SUCCESS on success
  37. - IFX_ERROR on error
  38. */
  39. -IFXOS_STATIC IFX_int32_t IFXOS_KernelThreadStartup(
  40. - IFXOS_ThreadCtrl_t *pThrCntrl)
  41. +int IFXOS_KernelThreadStartup(void *data)
  42. {
  43. + IFXOS_ThreadCtrl_t *pThrCntrl = (IFXOS_ThreadCtrl_t*) data;
  44. IFX_int32_t retVal = IFX_ERROR;
  45. #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0))
  46. struct task_struct *kthread = current;
  47. @@ -139,7 +135,7 @@
  48. /* let others run */
  49. unlock_kernel();
  50. #else
  51. - daemonize(pThrCntrl->thrParams.pName);
  52. + //daemonize(pThrCntrl->thrParams.pName);
  53. /* Enable signals in Kernel >= 2.6 */
  54. allow_signal(SIGKILL);
  55. @@ -218,9 +214,7 @@
  56. init_completion(&pThrCntrl->thrCompletion);
  57. /* start kernel thread via the wrapper function */
  58. - pThrCntrl->tid = kernel_thread( (IFXOS_KERNEL_THREAD_StartRoutine)IFXOS_KernelThreadStartup,
  59. - (void *)pThrCntrl,
  60. - IFXOS_DRV_THREAD_OPTIONS);
  61. + pThrCntrl->tid = kthread_run(IFXOS_KernelThreadStartup, (void *)pThrCntrl, "ifxos");
  62. pThrCntrl->bValid = IFX_TRUE;
  63. Index: lib_ifxos-1.5.14/src/include/ifxos_thread.h
  64. ===================================================================
  65. --- lib_ifxos-1.5.14.orig/src/include/ifxos_thread.h 2010-01-14 10:59:13.000000000 +0100
  66. +++ lib_ifxos-1.5.14/src/include/ifxos_thread.h 2013-03-14 08:24:43.577812806 +0100
  67. @@ -111,7 +111,7 @@
  68. /**
  69. Function type of the user thread/task function.
  70. */
  71. -typedef IFX_int32_t (*IFXOS_ThreadFunction_t)(IFXOS_ThreadParams_t *);
  72. +typedef int (*IFXOS_ThreadFunction_t)(void*);
  73. /** @} */
  74. Index: lib_ifxos-1.5.14/src/include/linux/ifxos_linux_thread.h
  75. ===================================================================
  76. --- lib_ifxos-1.5.14.orig/src/include/linux/ifxos_linux_thread.h 2010-01-08 18:10:27.000000000 +0100
  77. +++ lib_ifxos-1.5.14/src/include/linux/ifxos_linux_thread.h 2013-03-14 08:25:13.193814073 +0100
  78. @@ -152,7 +152,7 @@
  79. IFXOS_ThreadFunction_t pThrFct;
  80. /** Kernel thread process ID */
  81. - IFX_int32_t tid;
  82. + struct task_struct *tid;
  83. /** requested kernel thread priority */
  84. IFX_int32_t nPriority;