This gets referred to a lot in commit messages, so let's pull it into the selftests. Almost vanilla from: http://ozlabs.org/~anton/junkcode/context_switch2.c Signed-off-by: Anton Blanchard <anton@samba.org> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Acked-by: Anton Blanchard <anton@samba.org>
15 lines
198 B
Makefile
15 lines
198 B
Makefile
TEST_PROGS := gettimeofday context_switch
|
|
|
|
CFLAGS += -O2
|
|
|
|
all: $(TEST_PROGS)
|
|
|
|
$(TEST_PROGS): ../harness.c
|
|
|
|
context_switch: LDLIBS += -lpthread
|
|
|
|
include ../../lib.mk
|
|
|
|
clean:
|
|
rm -f $(TEST_PROGS) *.o
|