diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2013-11-11 15:18:57 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2013-11-11 15:18:57 -0600 |
commit | b83fdc6a4c19a6e99c0ce10b98db5374519d5e79 (patch) | |
tree | 8e907ba687465a76995465aaea5b420973b16734 /apps/examples/i2schar/i2schar_main.c | |
parent | 35805fc983f9cd16b745f4326582e2f936e74cc5 (diff) | |
download | nuttx-b83fdc6a4c19a6e99c0ce10b98db5374519d5e79.tar.gz nuttx-b83fdc6a4c19a6e99c0ce10b98db5374519d5e79.tar.bz2 nuttx-b83fdc6a4c19a6e99c0ce10b98db5374519d5e79.zip |
Various fixes from initial attempts to integrate the SAMA5 SSC/I2C driver with the I2C character driver loopback test
Diffstat (limited to 'apps/examples/i2schar/i2schar_main.c')
-rw-r--r-- | apps/examples/i2schar/i2schar_main.c | 7 |
1 files changed, 7 insertions, 0 deletions
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); |