X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/7b2cd970ec5f158a24c5ab20db80fbfa3cb88dda..2a537311063d3e49479ff4cc8b94287a10c37266:/client/comms.c diff --git a/client/comms.c b/client/comms.c index 86dca3ed..190b9110 100644 --- a/client/comms.c +++ b/client/comms.c @@ -18,6 +18,7 @@ #include "uart.h" #include "ui.h" #include "common.h" +#include "util_darwin.h" #include "util_posix.h" @@ -198,6 +199,10 @@ __attribute__((force_align_arg_pointer)) UsbCommand rx; UsbCommand *prx = ℞ +#if defined(__MACH__) && defined(__APPLE__) + disableAppNap("Proxmark3 polling UART"); +#endif + while (conn->run) { rxlen = 0; bool ACK_received = false; @@ -236,6 +241,10 @@ __attribute__((force_align_arg_pointer)) pthread_mutex_unlock(&txBufferMutex); } +#if defined(__MACH__) && defined(__APPLE__) + enableAppNap(); +#endif + pthread_exit(NULL); return NULL; } @@ -364,7 +373,9 @@ void CloseProxmark(void) { // Clean up our state sp = NULL; serial_port_name = NULL; +#ifdef __BIONIC__ memset(&USB_communication_thread, 0, sizeof(pthread_t)); +#endif }