changeset 133:4199bde397dd

8131087: [UART] Break generation too long Summary: Fixed ioctl parameter value and event notification execution flow Reviewed-by: alkonsta
author snazarki
date Wed, 29 Jul 2015 16:48:57 +0300
parents 72bb950d8d6d
children 75060fb01074
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 Jun 05 13:36:37 2015 +0300
+++ b/src/se/native/com/oracle/dio/dio_event_queue.cpp	Wed Jul 29 16:48:57 2015 +0300
@@ -96,11 +96,10 @@
                 memcpy(buf, payload, payload_size);
 
                 env->CallObjectMethod(eventBufferRef, setLimitID, newLimit);
-                env->CallVoidMethod(eventBufferRef, notifyID);
             }
-
-            env->MonitorExit(eventBufferRef);
+            env->CallVoidMethod(eventBufferRef, notifyID);
         }
+        env->MonitorExit(eventBufferRef);
     }
     cachedJVM->DetachCurrentThread();
 }
--- a/src/share/linux/native/com/oracle/dio/uart/uart.c	Fri Jun 05 13:36:37 2015 +0300
+++ b/src/share/linux/native/com/oracle/dio/uart/uart.c	Wed Jul 29 16:48:57 2015 +0300
@@ -620,6 +620,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 {