You can find project details in wiki
samsung / libtuv Goto Github PK
View Code? Open in Web Editor NEWAsynchronous I/O for IoT.js and embedded system
License: Apache License 2.0
Asynchronous I/O for IoT.js and embedded system
License: Apache License 2.0
You can find project details in wiki
On an Ubuntu 15.10 (x86_64/Linux) with gcc 5.2.1, I get the following diagnostics when building libtuv with make
:
/home/akiss/devel/libtuv/source/unix/tuv_unix_port_system.c: In function ‘uv_sleep’:
/home/akiss/devel/libtuv/source/unix/tuv_unix_port_system.c:22:3: warning: implicit declaration of function ‘usleep’ [-Wimplicit-function-declaration]
usleep(msec*1000);
/home/akiss/devel/libtuv/test/test_timer.c: In function ‘run_test_timer_run_once’:
/home/akiss/devel/libtuv/test/test_timer.c:345:3: warning: implicit declaration of function ‘uv_usleep’ [-Wimplicit-function-declaration]
uv_usleep(1000);
/home/akiss/devel/libtuv/test/test_timer.c:345: undefined reference to `uv_usleep'
Third run of tuvtester
fails at threadpool_queue_work_simple
unit test.
It just stops running. poll()
seems to block.
Hello,
I found an assertion failure when trying to stop UV handle by using uv__handle_stop in src/uv-common.h
The running flow is:
It seems the assertion should not be used here.
Maybe I have some misunderstanding of the code, would you help check it?
Thank you very much.
This source file contains exposed functions which appear to be used elsewhere ... uv_unix_udp.c
However there is no header definition for the exposed functions.
The structure called struct uv__async is defined in uv__async.h
Line 80 in bfc5089
however, in uv.h ... the include of uv_loop.h (which uses struct uv__async) occurs before the include of uv__async.h
I am refering to https://github.com/Samsung/libtuv/blob/master/src/uv-common.c#L118
On TizenRT there are some hard to find error definitions. This line cause core dump, while it could return "unknown error" / NULL. Current logic seems to be debug purpose, and end user would not expect exception because there is no proper string defined. It is not easy to get rid of this, and require recompilation/flashing of whole OS.
Hello,
I'm developing JavaScript REPL with Jerryscript and libtuv on NuttX platform. However, It seems that TTY functions are not ported in libtuv.
I've tried to include the tty.c
source file when building, but it fails to link to symbols: ttyname_r
, cfmakeraw
, and uv__dup2_cloexec
. (ttyname_r
and cfmakeraw
are not found in any source files in NuttX)
Do you have any plans to support TTY?
Thanks.
DNS is missing lookup functionality. There is no implementation for:
int uv_getnameinfo(uv_loop_t* loop, uv_getnameinfo_t* req, uv_getnameinfo_cb getnameinfo_cb, const struct sockaddr* addr, int flags)
I try to use function uv_udp_send from UDP support but I have a problem and always receive -1.
Line 300 in 7428141
The same function on Raspberry Pi work correct but on TizenRT UDP package isn't sending.
Are you sure that UDP work correct? I don't see any test for UDP in project. Could you add tests or simple example to confirm that UDP works correct?
Libtuv currently does not have an implementation for UDP. Looking at the LibUV API's, all functions prefixed with uv_udp_* have not been implemented. I saw that there is some code with commented out case statements containing UDP code paths so it would appear support may be in the works.
On an Ubuntu 15.10 (x86_64/Linux) with gcc 5.2.1, I get the following errors when building libtuv with make
:
In file included from /home/akiss/devel/libtuv/include/uv.h:54:0,
from /home/akiss/devel/libtuv/source/linux/uv_linux_thread.c:40:
/home/akiss/devel/libtuv/source/linux/uv_platform.h:102:17: warning: inline function ‘uv__time_precise’ declared but never defined
inline uint64_t uv__time_precise();
In file included from /home/akiss/devel/libtuv/include/uv.h:54:0,
from /home/akiss/devel/libtuv/test/runner_linux.c:44:
/home/akiss/devel/libtuv/source/linux/uv_platform.h:102:17: warning: inline function ‘uv__time_precise’ declared but never defined
inline uint64_t uv__time_precise();
Linking C executable ../bin/tuvtester
../lib/libtuv.a(uv_unix_thread.c.o): In function `uv_cond_timedwait':
/home/akiss/devel/libtuv/source/unix/uv_unix_thread.c:311: undefined reference to `uv__time_precise'
(The warnings repeat several times.)
Hi,
We have been unable to open/close more than 32 sockets (iot.js on STM32F4).
It seems to be related to the management of poll events in libtuv/src/unix/nuttx.c.
Here is a summary of what we found:
uv_add_pollfd should check that loop->npollfds is always less than the fixed size of the array (TUV_POLL_EVENTS_SIZE, which defaults to 32)
uv__platform_invalidate_fd should restructure the array (like uv_rem_poll_fd) instead of just marking invalidated fd.
uv_rem_pollfd, which would keep the pollfds table from growing, is unfortunately never called (because of the invalidation of the fd done in uv__platform_invalidate_fd).
Hope this helps.
Cedric & Vincent
fs_file_noent
test fails on nuttx when tuvtester
is in second run. it halts and no response.
only running fs_file_noent
and commenting others in runner_list.h
shows same result.
Need to import below structure(s) and function(s)
getaddrinfo()
yet.use 239ab0b79c44b983862f9eb55db3c9a5d30d480a
run tuvtester
, timer
test case will fail at TUV_ASSERT(0 == uv_loop_close(uv_default_loop()));
in uv_loop_close(),
QUEUE_FOREACH(q, &loop->handles_queue) {
h = QUEUE_DATA(q, uv_handle_t, handle_queue);
if (!(h->flags & UV__HANDLE_INTERNAL)) {
return UV_EBUSY;
}
}
will return UV_EBUSY as handles_queue is not empty, but should be emtpy
tuvtester
running in nuttx.
First run
nsh> free
total used free largest
Mem: 165104 13136 151968 97376
Second run
nsh> free
total used free largest
Mem: 165104 13472 151632 97376
TTL support is almost working for TizenRT but flag IPV6_UNICAST_HOPS is missing:
https://github.com/Samsung/libtuv/blob/master/src/unix/udp.c#L811
This issue prevents successful configuration of TTL in IoT.js for two tests.
test_dgram_setttl_client.js:
https://github.com/Samsung/iotjs/blob/master/test/run_pass/test_dgram_setttl_client.js#L36
test_dgram_setttl_server.js
https://github.com/Samsung/iotjs/blob/master/test/run_pass/test_dgram_setttl_server.js#L45
There is a reference to a function called uv__udp_finish_close() ... see:
Line 68 in 65b4efa
That is defined only in the Unix specific implementation ...
I believe this needs to be abstracted.
It seems "/source/uv_inet.c" is coming from "https://github.com/Samsung/libuv/blob/v1.x/src/inet.c".
However, it has wrong license. It should be below:
/*
* Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC")
* Copyright (c) 1996-1999 by Internet Software Consortium.
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT
* OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
For tracking purpose it would help to tag a release that would be used in downstream projects
Relate-to: jerryscript-project/iotjs#1945
when tuvtester is executed twice, echo-server fails to listen(or accept)
log shows
tcp_callback: flags: 0002
tcp_data_event: No listener on connection
result of this is that on_connection
is not called in echo_server.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.