changeset 194:2c0af8cb3202

8131087: [UART] Break generation too long Summary: Fixed ioctl parameter value and event notification execution flow Reviewed-by: alkonsta
author snazarki
date Mon, 13 Jul 2015 21:30:27 +0300
parents f9e44621e638
children a2c106aa4c74
files src/se/native/com/oracle/dio/dio_event_queue.cpp src/share/linux/native/com/oracle/dio/uart/uart.c
diffstat 2 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/se/native/com/oracle/dio/dio_event_queue.cpp	Fri Jul 10 13:55:35 2015 +0300
+++ b/src/se/native/com/oracle/dio/dio_event_queue.cpp	Mon Jul 13 21:30:27 2015 +0300
@@ -84,11 +84,10 @@
                 memcpy(buf, payload, payload_size);
 
                 env->CallObjectMethod(eventBuffer, setLimitID, newLimit);
-                env->CallVoidMethod(eventBuffer, notifyID);
             }
-
-            env->MonitorExit(eventBuffer);
+            env->CallVoidMethod(eventBuffer, notifyID);
         }
+        env->MonitorExit(eventBuffer);
     }
     cachedJVM->DetachCurrentThread();
 }
--- a/src/share/linux/native/com/oracle/dio/uart/uart.c	Fri Jul 10 13:55:35 2015 +0300
+++ b/src/share/linux/native/com/oracle/dio/uart/uart.c	Mon Jul 13 21:30:27 2015 +0300
@@ -694,6 +694,7 @@
     pthread_t thread_id;
     struct tuple *data = (struct tuple*) javacall_malloc (sizeof(struct tuple));
     data->uart = uart;
+    data->duration = duration;
     if (pthread_create(&thread_id, NULL, break_thread, data) == 0) {
         pthread_detach(thread_id);
     } else {