Add timeout to jerry_debugger_receive (#1885)

Fixed when debug server uses a CPU core on 100%.

JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
This commit is contained in:
rerobika
2017-06-28 11:26:45 +02:00
committed by László Langó
parent 2f140e3b7f
commit c31e8b8c17
2 changed files with 42 additions and 0 deletions
+10
View File
@@ -181,6 +181,16 @@ if(FEATURE_DEBUGGER)
message(FATAL_ERROR "This configuration is not supported. Please build against your system libc to enable the JerryScript debugger.")
endif()
# Sleep function availability check
INCLUDE (CheckIncludeFiles)
CHECK_INCLUDE_FILES (time.h HAVE_TIME_H)
CHECK_INCLUDE_FILES (unistd.h HAVE_UNISTD_H)
if(HAVE_TIME_H)
set(DEFINES_JERRY ${DEFINES_JERRY} HAVE_TIME_H)
elseif(HAVE_UNISTD_H)
set(DEFINES_JERRY ${DEFINES_JERRY} HAVE_UNISTD_H)
endif()
set(DEFINES_JERRY ${DEFINES_JERRY} JERRY_DEBUGGER)
set(DEFINES_JERRY ${DEFINES_JERRY} JERRY_DEBUGGER_PORT=${FEATURE_DEBUGGER_PORT})
endif()