[Tinyos-2-commits] CVS: tinyos-2.x/tools/tinyos/java/serial
Makefile.am, 1.3, 1.4 NativeSerial_linux.cpp, 1.4, 1.5
David Gay
idgay at users.sourceforge.net
Tue Jun 5 14:08:57 PDT 2007
Update of /cvsroot/tinyos/tinyos-2.x/tools/tinyos/java/serial
In directory sc8-pr-cvs10.sourceforge.net:/tmp/cvs-serv29245
Modified Files:
Makefile.am NativeSerial_linux.cpp
Log Message:
fix a serial bug
force 32-bit compilation (JDKs seem to want that)
Index: Makefile.am
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tools/tinyos/java/serial/Makefile.am,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** Makefile.am 9 Jan 2007 23:45:17 -0000 1.3
--- Makefile.am 5 Jun 2007 21:08:55 -0000 1.4
***************
*** 20,24 ****
libtoscomm.so: $(libtoscomm_so_SOURCES)
! $(CXX) -O2 -shared -fPIC "-I$(JDK)/include" "-I$(JDK)/include/linux" \
-o $@ NativeSerial_linux.cpp
--- 20,24 ----
libtoscomm.so: $(libtoscomm_so_SOURCES)
! $(CXX) -m32 -O2 -shared -fPIC "-I$(JDK)/include" "-I$(JDK)/include/linux" \
-o $@ NativeSerial_linux.cpp
Index: NativeSerial_linux.cpp
===================================================================
RCS file: /cvsroot/tinyos/tinyos-2.x/tools/tinyos/java/serial/NativeSerial_linux.cpp,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** NativeSerial_linux.cpp 12 Dec 2006 18:23:02 -0000 1.4
--- NativeSerial_linux.cpp 5 Jun 2007 21:08:55 -0000 1.5
***************
*** 349,361 ****
struct timeval tv;
m_events_out = 0;
while( m_wait_for_events && (m_fd != -1) && (m_events_out == 0) )
{
FD_ZERO( &input );
! FD_SET( m_fd, &input );
tv.tv_sec = 0;
tv.tv_usec = 100*1000; // 1ms is the minimum resolution, at best
! if( select( m_fd+1, &input, NULL, NULL, &tv ) == -1 )
{
if( errno == EINTR )
--- 349,362 ----
struct timeval tv;
m_events_out = 0;
+ int fd = m_fd;
while( m_wait_for_events && (m_fd != -1) && (m_events_out == 0) )
{
FD_ZERO( &input );
! FD_SET( fd, &input );
tv.tv_sec = 0;
tv.tv_usec = 100*1000; // 1ms is the minimum resolution, at best
! if( select( fd+1, &input, NULL, NULL, &tv ) == -1 )
{
if( errno == EINTR )
***************
*** 364,368 ****
}
! if( FD_ISSET( m_fd, &input ) )
m_events_out |= DATA_AVAILABLE;
}
--- 365,369 ----
}
! if( FD_ISSET( fd, &input ) )
m_events_out |= DATA_AVAILABLE;
}
More information about the Tinyos-2-commits
mailing list