Commit de96adab authored by julien.delange's avatar julien.delange
Browse files

* po-hi-c/src/po_hi_protected.c

   - Do not handle PIP/PCP with LinuxTaste since the uClibC does
     not handle the different POSIX locking policies

 * po-hi-c/share/make/Makefile.linux32
   po-hi-c/share/make/Makefile.linux64
   - Add appropriate flags to compile generated applications

 * po-hi-c/share/make/Makefile.x86.linuxtaste
   - Add special flags to make conditional compilation within pohic



git-svn-id: https://tecsw.estec.esa.int/svn/taste/trunk/po-hi-c@1702 129961e7-ef38-4bb5-a8f7-c9a525a55882
parent afe4ee24
TARGET_CFLAGS = -DPOSIX -m32 TARGET_CFLAGS = -DPOSIX -m32 -D_POSIX_SOURCE -D_GNU_SOURCE
TARGET_LDFLAGS = -lpthread -lrt -m32 TARGET_LDFLAGS = -lpthread -lrt -m32
SIMULINK_LDFLAGS = -lm SIMULINK_LDFLAGS = -lm
CC = gcc CC = gcc
LD = ld LD = ld
......
TARGET_CFLAGS = -DPOSIX -m64 TARGET_CFLAGS = -DPOSIX -m64 -D_POSIX_SOURCE -D_GNU_SOURCE
TARGET_LDFLAGS = -lpthread -lrt -m64 TARGET_LDFLAGS = -lpthread -lrt -m64
SIMULINK_LDFLAGS = -lm SIMULINK_LDFLAGS = -lm
CC = gcc CC = gcc
......
...@@ -12,11 +12,12 @@ GPROF = ...@@ -12,11 +12,12 @@ GPROF =
TARGET_SOURCES = TARGET_SOURCES =
TARGET_TRANSPORT_SOURCES = TARGET_TRANSPORT_SOURCES =
TARGET_CFLAGS = -I$(LINUXTASTE_PATH)/output/target/usr/local/include -DPOSIX TARGET_CFLAGS = -I$(LINUXTASTE_PATH)/output/target/usr/local/include -DPOSIX -D_POSIX_SOURCE -D_GNU_SOURCE -D__PO_HI_PLATFORM_LINUXTASTE
TARGET_INCLUDE = TARGET_INCLUDE =
LD = i386-linux-ld LD = i386-linux-ld
TARGET_LDFLAGS = -L$(LINUXTASTE_PATH)/output/target/usr/local/lib -lrt -lpthread -lcomedi -lm TARGET_LDFLAGS = -L$(LINUXTASTE_PATH)/output/target/usr/local/lib -lrt -lpthread -lcomedi -lm
target-clean: target-clean:
......
...@@ -39,7 +39,9 @@ extern __po_hi_uint8_t __po_hi_protected_priorities[__PO_HI_NB_P ...@@ -39,7 +39,9 @@ extern __po_hi_uint8_t __po_hi_protected_priorities[__PO_HI_NB_P
int __po_hi_protected_init () int __po_hi_protected_init ()
{ {
__po_hi_uint8_t i; __po_hi_uint8_t i;
#ifndef __PO_HI_PLATFORM_LINUXTASTE
__po_hi_uint8_t prio; __po_hi_uint8_t prio;
#endif
for (i = 0 ; i < __PO_HI_NB_PROTECTED ; i++ ) for (i = 0 ; i < __PO_HI_NB_PROTECTED ; i++ )
{ {
...@@ -48,6 +50,7 @@ int __po_hi_protected_init () ...@@ -48,6 +50,7 @@ int __po_hi_protected_init ()
__PO_HI_DEBUG_DEBUG ("[PROTECTED] Error while initializing mutex attr\n"); __PO_HI_DEBUG_DEBUG ("[PROTECTED] Error while initializing mutex attr\n");
} }
#ifndef __PO_HI_PLATFORM_LINUXTASTE
if (__po_hi_protected_configuration[i] == __PO_HI_PROTECTED_IPCP) if (__po_hi_protected_configuration[i] == __PO_HI_PROTECTED_IPCP)
{ {
if (pthread_mutexattr_setprotocol (&__po_hi_protected_mutexes_attr[i], PTHREAD_PRIO_PROTECT) != 0) if (pthread_mutexattr_setprotocol (&__po_hi_protected_mutexes_attr[i], PTHREAD_PRIO_PROTECT) != 0)
...@@ -77,6 +80,7 @@ int __po_hi_protected_init () ...@@ -77,6 +80,7 @@ int __po_hi_protected_init ()
__PO_HI_DEBUG_DEBUG ("[PROTECTED] Error while changing mutex protocol\n"); __PO_HI_DEBUG_DEBUG ("[PROTECTED] Error while changing mutex protocol\n");
} }
} }
#endif
if (pthread_mutex_init (&__po_hi_protected_mutexes[i], &__po_hi_protected_mutexes_attr[i]) != 0) if (pthread_mutex_init (&__po_hi_protected_mutexes[i], &__po_hi_protected_mutexes_attr[i]) != 0)
{ {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment