drivers/timers_kernel_xeno/Makefile.in
author Robert Lehmann <robert.lehmann@sitec-systems.de>
Tue, 28 Jul 2015 16:36:55 +0200
changeset 793 72e9e1064432
parent 629 b9274b595650
permissions -rw-r--r--
timers_unix: Fix termination problem of WaitReceiveTaskEnd

The function pthread_kill sends the Signal thread and to the own process.
If you use this construct than the application which calls uses the
canfestival api will terminate at the call of canClose. To avoid that
use pthread_cancel instead of pthread_kill. To use the pthread_cancel call
you need to set the cancel ability in the thread function. That means
you need to call pthread_setcancelstate and pthread_setcanceltype.
For the termination of the thread at any time it is important to set the
cancel type to PTHREAD_CANCEL_ASYNCHRONOUS.
629
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     1
#! gmake
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     2
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     3
#
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     4
# Copyright (C) 2010 Cosateq GmbH & Co.KG
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     5
#               http://www.cosateq.com/
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     6
#               http://www.scale-rt.com/
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     7
#
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     8
# This file is part of canfestival, a library implementing the canopen
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
     9
# stack
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    10
#
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    11
# This library is free software; you can redistribute it and/or
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    12
# modify it under the terms of the GNU Lesser General Public
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    13
# License as published by the Free Software Foundation; either
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    14
# version 2.1 of the License, or (at your option) any later version.
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    15
#
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    16
# This library is distributed in the hope that it will be useful,
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    17
# but WITHOUT ANY WARRANTY; without even the implied warranty of
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    18
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    19
# Lesser General Public License for more details.
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    20
#
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    21
# You should have received a copy of the GNU Lesser General Public
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    22
# License along with this library; if not, write to the Free Software
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    23
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    24
#
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    25
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    26
#ifneq ($(KERNELRELEASE),)
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    27
# Kbuild part of Makefile
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    28
TARGET = SUB_TARGET
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    29
CAN_DRIVER = SUB_CAN_DRIVER
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    30
TIMERS_DRIVER = SUB_TIMERS_DRIVER
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    31
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    32
EXTRA_CFLAGS := -I$(src)/../../include
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    33
EXTRA_CFLAGS += -I$(src)/../../include/$(TARGET)
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    34
EXTRA_CFLAGS += -I$(src)/../../include/$(CAN_DRIVER)
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    35
EXTRA_CFLAGS += -I$(src)/../../include/$(TIMERS_DRIVER)
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    36
EXTRA_CFLAGS += SUB_PROG_CFLAGS
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    37
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    38
obj-m := $(TIMERS_DRIVER).o
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    39
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    40
#else
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    41
# Normal Makefile
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    42
PREFIX = SUB_PREFIX
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    43
KERNELDIR := SUB_KERNELDIR
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    44
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    45
all: driver
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    46
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    47
driver:
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    48
	$(MAKE) -C $(KERNELDIR) M=$(shell pwd) modules
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    49
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    50
clean:
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    51
	$(MAKE) -C $(KERNELDIR) M=$(shell pwd) clean
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    52
	rm -f Module.symvers
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    53
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    54
mrproper: clean
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    55
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    56
install:
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    57
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    58
b9274b595650 CosateQ contribution.
edouard
parents:
diff changeset
    59
#endif