FIX: OSX disable app-nap during serial comm (@anticat)

https://github.com/Proxmark/proxmark3/pull/687
This commit is contained in:
Chris 2018-10-06 13:29:20 +02:00
commit 7d09a466fb
6 changed files with 83 additions and 5 deletions

View file

@ -242,6 +242,11 @@ __attribute__((force_align_arg_pointer))
UsbCommand *prx = ℞
//int counter_to_offline = 0;
#if defined(__MACH__) && defined(__APPLE__)
disableAppNap("Proxmark3 polling UART");
#endif
while (conn->run) {
rxlen = 0;
@ -288,6 +293,11 @@ __attribute__((force_align_arg_pointer))
// when this reader thread dies, we close the serial port.
uart_close(sp);
sp = NULL;
#if defined(__MACH__) && defined(__APPLE__)
enableAppNap();
#endif
pthread_exit(NULL);
return NULL;