From b83fdc6a4c19a6e99c0ce10b98db5374519d5e79 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 11 Nov 2013 15:18:57 -0600 Subject: Various fixes from initial attempts to integrate the SAMA5 SSC/I2C driver with the I2C character driver loopback test --- apps/examples/i2schar/i2schar_main.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'apps/examples/i2schar/i2schar_main.c') diff --git a/apps/examples/i2schar/i2schar_main.c b/apps/examples/i2schar/i2schar_main.c index 2d5df3ce9..524a27550 100644 --- a/apps/examples/i2schar/i2schar_main.c +++ b/apps/examples/i2schar/i2schar_main.c @@ -297,9 +297,12 @@ int i2schar_main(int argc, char *argv[]) ret = pthread_create(&transmitter, &attr, i2schar_transmitter, NULL); if (ret != OK) { + sched_unlock(); message("i2schar_main: ERROR: failed to Start transmitter thread: %d\n", ret); return EXIT_FAILURE; } + + pthread_setname_np(transmitter, "transmitter"); #endif #ifdef CONFIG_EXAMPLES_I2SCHAR_RX @@ -313,6 +316,7 @@ int i2schar_main(int argc, char *argv[]) ret = pthread_create(&receiver, &attr, i2schar_receiver, NULL); if (ret != OK) { + sched_unlock(); message("i2schar_main: ERROR: failed to Start receiver thread: %d\n", ret); #ifdef CONFIG_EXAMPLES_I2SCHAR_TX message("i2schar_main: Waiting for the transmitter thread\n"); @@ -320,8 +324,11 @@ int i2schar_main(int argc, char *argv[]) #endif return EXIT_FAILURE; } + + pthread_setname_np(transmitter, "receiver"); #endif + sched_unlock(); #ifdef CONFIG_EXAMPLES_I2SCHAR_TX message("i2schar_main: Waiting for the transmitter thread\n"); ret = pthread_join(transmitter, &result); -- cgit v1.2.3