|
From: <mla...@us...> - 2008-01-02 03:18:23
|
Revision: 389
http://g15daemon.svn.sourceforge.net/g15daemon/?rev=389&view=rev
Author: mlampard
Date: 2008-01-01 19:18:26 -0800 (Tue, 01 Jan 2008)
Log Message:
-----------
remove mutexes on libg15 functions if running on Solaris.
Modified Paths:
--------------
trunk/g15daemon-wip/ChangeLog
trunk/g15daemon-wip/g15daemon/utility_funcs.c
Modified: trunk/g15daemon-wip/ChangeLog
===================================================================
--- trunk/g15daemon-wip/ChangeLog 2008-01-02 02:27:03 UTC (rev 388)
+++ trunk/g15daemon-wip/ChangeLog 2008-01-02 03:18:26 UTC (rev 389)
@@ -144,3 +144,6 @@
- Portability: Add our own daemon() function if platform doesn't have native
support.
- TidyUp: Wrap keyboard read function.
+- TidyUp: Make all plugin-internal functions static.
+- Portability: Remove mutexes on Solaris, as libusb (and therefore libg15)
+ blocks on read.
Modified: trunk/g15daemon-wip/g15daemon/utility_funcs.c
===================================================================
--- trunk/g15daemon-wip/g15daemon/utility_funcs.c 2008-01-02 02:27:03 UTC (rev 388)
+++ trunk/g15daemon-wip/g15daemon/utility_funcs.c 2008-01-02 03:18:26 UTC (rev 389)
@@ -186,18 +186,26 @@
int uf_write_buf_to_g15(lcd_t *lcd)
{
int retval = 0;
+#ifdef OSTYPE_SOLARIS
+ retval = writePixmapToLCD(lcd->buf);
+#else
pthread_mutex_lock(&g15lib_mutex);
retval = writePixmapToLCD(lcd->buf);
pthread_mutex_unlock(&g15lib_mutex);
+#endif
return retval;
}
int uf_read_keypresses(unsigned int *keypresses, unsigned int timeout)
{
int retval=0;
+#ifdef OSTYPE_SOLARIS
+ retval = getPressedKeys(keypresses, timeout);
+#else
pthread_mutex_lock(&g15lib_mutex);
retval = getPressedKeys(keypresses, timeout);
pthread_mutex_unlock(&g15lib_mutex);
+#endif
return retval;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|