view release on metacpan or search on metacpan
libuv/AUTHORS view on Meta::CPAN
Clifford Heath <clifford.heath@gmail.com>
Jorge Chamorro Bieling <jorge@jorgechamorro.com>
Luis Lavena <luislavena@gmail.com>
Matthew Sporleder <msporleder@gmail.com>
Erick Tryzelaar <erick.tryzelaar@gmail.com>
Isaac Z. Schlueter <i@izs.me>
Pieter Noordhuis <pcnoordhuis@gmail.com>
Marek Jelen <marek@jelen.biz>
Fedor Indutny <fedor.indutny@gmail.com>
Saúl Ibarra Corretgé <saghul@gmail.com>
Felix GeisendoÌrfer <felix@debuggable.com>
Yuki Okumura <mjt@cltn.org>
Roman Shtylman <shtylman@gmail.com>
Frank Denis <github@pureftpd.org>
Carter Allen <CarterA@opt-6.com>
Tj Holowaychuk <tj@vision-media.ca>
Shimon Doodkin <helpmepro1@gmail.com>
Ryan Emery <seebees@gmail.com>
Bruce Mitchener <bruce.mitchener@gmail.com>
Maciej MaÅecki <maciej.malecki@notimplemented.org>
Yasuhiro Matsumoto <mattn.jp@gmail.com>
libuv/ChangeLog view on Meta::CPAN
* unix, win: add uv_udp_try_send (Andrius Bentkus)
* unix: return UV_EAGAIN if uv_try_write cannot write any data (Saúl Ibarra
Corretgé)
* windows: fix compatibility with cygwin pipes (Jameson Nash)
* windows: count queued bytes even if request completed immediately (Saúl
Ibarra Corretgé)
* windows: disable CRT debug handler on MinGW32 (Saúl Ibarra Corretgé)
* windows: map ERROR_INVALID_DRIVE to UV_ENOENT (Saúl Ibarra Corretgé)
* unix: try to write immediately in uv_udp_send (Saúl Ibarra Corretgé)
* unix: remove incorrect assert (Saúl Ibarra Corretgé)
* openbsd: avoid requiring privileges for uv_resident_set_memory (Aaron Bieber)
* unix: guarantee write queue cb execution order in streams (Andrius Bentkus)
libuv/ChangeLog view on Meta::CPAN
2014.03.11, Version 0.11.22 (Unstable), cd0c19b1d3c56acf0ade7687006e12e75fbda36d
Changes since version 0.11.21:
* unix, windows: map ERANGE errno (Saúl Ibarra Corretgé)
* unix, windows: make uv_cwd be consistent with uv_exepath (Saúl Ibarra
Corretgé)
* process: remove debug perror() prints (Fedor Indutny)
* windows: fall back for volume info query (Isaiah Norton)
* pipe: allow queueing pending handles (Fedor Indutny)
* windows: fix winsock status codes for address errors (Raul Martins)
* windows: Remove unused variable from uv__pipe_insert_pending_socket (David
Capello)
libuv/README.md view on Meta::CPAN
To run the tests:
```console
> vcbuild test
```
To see all the options that could passed to `vcbuild`:
```console
> vcbuild help
vcbuild.bat [debug/release] [test/bench] [clean] [noprojgen] [nobuild] [vs2017] [x86/x64] [static/shared]
Examples:
vcbuild.bat : builds debug build
vcbuild.bat test : builds debug build and runs tests
vcbuild.bat release bench: builds release build and runs benchmarks
```
### Unix
For Debug builds (recommended) run:
```bash
$ ./gyp_uv.py -f make
libuv/README.md view on Meta::CPAN
Note for UNIX users: compile your project with `-D_LARGEFILE_SOURCE` and
`-D_FILE_OFFSET_BITS=64`. GYP builds take care of that automatically.
### Using Ninja
To use ninja for build on ninja supported platforms, run:
```bash
$ ./gyp_uv.py -f ninja
$ ninja -C out/Debug #for debug build OR
$ ninja -C out/Release
```
### Running tests
#### Build
Build (includes tests):
libuv/common.gypi view on Meta::CPAN
'target_defaults': {
'default_configuration': 'Debug',
'configurations': {
'Debug': {
'defines': [ 'DEBUG', '_DEBUG' ],
'cflags': [ '-g' ],
'msvs_settings': {
'VCCLCompilerTool': {
'target_conditions': [
['uv_library=="static_library"', {
'RuntimeLibrary': 1, # /MTd static debug
}, {
'RuntimeLibrary': 3, # /MDd DLL debug
}],
],
'Optimization': 0, # /Od, no optimization
'MinimalRebuild': 'false',
'OmitFramePointers': 'false',
'BasicRuntimeChecks': 3, # /RTC1
},
'VCLinkerTool': {
'LinkIncremental': 2, # enable incremental linking
},
libuv/docs/src/guide/threads.rst view on Meta::CPAN
The mutex functions are a **direct** map to the pthread equivalents.
.. rubric:: libuv mutex functions
.. literalinclude:: ../../../include/uv.h
:lines: 1355-1360
The ``uv_mutex_init()``, ``uv_mutex_init_recursive()`` and ``uv_mutex_trylock()``
functions will return 0 on success, and an error code otherwise.
If `libuv` has been compiled with debugging enabled, ``uv_mutex_destroy()``,
``uv_mutex_lock()`` and ``uv_mutex_unlock()`` will ``abort()`` on error.
Similarly ``uv_mutex_trylock()`` will abort if the error is anything *other
than* ``EAGAIN`` or ``EBUSY``.
Recursive mutexes are supported, but you should not rely on them. Also, they
should not be used with ``uv_cond_t`` variables.
The default BSD mutex implementation will raise an error if a thread which has
locked a mutex attempts to lock it again. For example, a construct like::
uv_mutex_init(a_mutex);
uv_mutex_lock(a_mutex);
uv_thread_create(thread_id, entry, (void *)a_mutex);
uv_mutex_lock(a_mutex);
// more things here
can be used to wait until another thread initializes some stuff and then
unlocks ``a_mutex`` but will lead to your program crashing if in debug mode, or
return an error in the second call to ``uv_mutex_lock()``.
.. note::
Mutexes on Windows are always recursive.
Locks
~~~~~
Read-write locks are a more granular access mechanism. Two readers can access
libuv/docs/src/misc.rst view on Meta::CPAN
[R--] idle 0x1a7a8c8
*/
The format is `[flags] handle-type handle-address`. For `flags`:
- `R` is printed for a handle that is referenced
- `A` is printed for a handle that is active
- `I` is printed for a handle that is internal
.. warning::
This function is meant for ad hoc debugging, there is no API/ABI
stability guarantees.
.. versionadded:: 1.8.0
.. c:function:: void uv_print_active_handles(uv_loop_t* loop, FILE* stream)
This is the same as :c:func:`uv_print_all_handles` except only active handles
are printed.
.. warning::
This function is meant for ad hoc debugging, there is no API/ABI
stability guarantees.
.. versionadded:: 1.8.0
.. c:function:: int uv_os_getenv(const char* name, char* buffer, size_t* size)
Retrieves the environment variable specified by `name`, copies its value
into `buffer`, and sets `size` to the string length of the value. When
calling this function, `size` must be set to the amount of storage available
in `buffer`, including the null terminator. If the environment variable
libuv/include/uv.h view on Meta::CPAN
UV_EXTERN size_t uv_req_size(uv_req_type type);
UV_EXTERN void* uv_req_get_data(const uv_req_t* req);
UV_EXTERN void uv_req_set_data(uv_req_t* req, void* data);
UV_EXTERN uv_req_type uv_req_get_type(const uv_req_t* req);
UV_EXTERN const char* uv_req_type_name(uv_req_type type);
UV_EXTERN int uv_is_active(const uv_handle_t* handle);
UV_EXTERN void uv_walk(uv_loop_t* loop, uv_walk_cb walk_cb, void* arg);
/* Helpers for ad hoc debugging, no API/ABI stability guaranteed. */
UV_EXTERN void uv_print_all_handles(uv_loop_t* loop, FILE* stream);
UV_EXTERN void uv_print_active_handles(uv_loop_t* loop, FILE* stream);
UV_EXTERN void uv_close(uv_handle_t* handle, uv_close_cb close_cb);
UV_EXTERN int uv_send_buffer_size(uv_handle_t* handle, int* value);
UV_EXTERN int uv_recv_buffer_size(uv_handle_t* handle, int* value);
UV_EXTERN int uv_fileno(const uv_handle_t* handle, uv_os_fd_t* fd);
libuv/samples/socks5-proxy/defs.h view on Meta::CPAN
/* main.c */
const char *_getprogname(void);
/* getopt.c */
#if !HAVE_UNISTD_H
extern char *optarg;
int getopt(int argc, char **argv, const char *options);
#endif
/* ASSERT() is for debug checks, CHECK() for run-time sanity checks.
* DEBUG_CHECKS is for expensive debug checks that we only want to
* enable in debug builds but still want type-checked by the compiler
* in release builds.
*/
#if defined(NDEBUG)
# define ASSERT(exp)
# define CHECK(exp) do { if (!(exp)) abort(); } while (0)
# define DEBUG_CHECKS (0)
#else
# define ASSERT(exp) assert(exp)
# define CHECK(exp) assert(exp)
# define DEBUG_CHECKS (1)
libuv/src/win/core.c view on Meta::CPAN
#include "queue.h"
#include "handle-inl.h"
#include "heap-inl.h"
#include "req-inl.h"
/* uv_once initialization guards */
static uv_once_t uv_init_guard_ = UV_ONCE_INIT;
#if defined(_DEBUG) && (defined(_MSC_VER) || defined(__MINGW64_VERSION_MAJOR))
/* Our crt debug report handler allows us to temporarily disable asserts
* just for the current thread.
*/
UV_THREAD_LOCAL int uv__crt_assert_enabled = TRUE;
static int uv__crt_dbg_report_handler(int report_type, char *message, int *ret_val) {
if (uv__crt_assert_enabled || report_type != _CRT_ASSERT)
return FALSE;
if (ret_val) {
libuv/src/win/core.c view on Meta::CPAN
SetErrorMode(SEM_FAILCRITICALERRORS | SEM_NOGPFAULTERRORBOX |
SEM_NOOPENFILEERRORBOX);
/* Tell the CRT to not exit the application when an invalid parameter is
* passed. The main issue is that invalid FDs will trigger this behavior.
*/
#if !defined(__MINGW32__) || __MSVCRT_VERSION__ >= 0x800
_set_invalid_parameter_handler(uv__crt_invalid_parameter_handler);
#endif
/* We also need to setup our debug report handler because some CRT
* functions (eg _get_osfhandle) raise an assert when called with invalid
* FDs even though they return the proper error code in the release build.
*/
#if defined(_DEBUG) && (defined(_MSC_VER) || defined(__MINGW64_VERSION_MAJOR))
_CrtSetReportHook(uv__crt_dbg_report_handler);
#endif
/* Initialize tracking of all uv loops */
uv__loops_init();
libuv/src/win/handle-inl.h view on Meta::CPAN
default:
assert(0);
break;
}
}
}
INLINE static HANDLE uv__get_osfhandle(int fd)
{
/* _get_osfhandle() raises an assert in debug builds if the FD is invalid.
* But it also correctly checks the FD and returns INVALID_HANDLE_VALUE for
* invalid FDs in release builds (or if you let the assert continue). So this
* wrapper function disables asserts when calling _get_osfhandle. */
HANDLE handle;
UV_BEGIN_DISABLE_CRT_ASSERT();
handle = (HANDLE) _get_osfhandle(fd);
UV_END_DISABLE_CRT_ASSERT();
return handle;
}
libuv/vcbuild.bat view on Meta::CPAN
set target_env=
set noprojgen=
set nobuild=
set run=
set vs_toolset=x86
set msbuild_platform=WIN32
set library=static_library
:next-arg
if "%1"=="" goto args-done
if /i "%1"=="debug" set config=Debug&goto arg-ok
if /i "%1"=="release" set config=Release&goto arg-ok
if /i "%1"=="test" set run=run-tests.exe&goto arg-ok
if /i "%1"=="bench" set run=run-benchmarks.exe&goto arg-ok
if /i "%1"=="clean" set target=Clean&goto arg-ok
if /i "%1"=="vs2017" set target_env=vs2017&goto arg-ok
if /i "%1"=="noprojgen" set noprojgen=1&goto arg-ok
if /i "%1"=="nobuild" set nobuild=1&goto arg-ok
if /i "%1"=="x86" set target_arch=ia32&set msbuild_platform=WIN32&set vs_toolset=x86&goto arg-ok
if /i "%1"=="ia32" set target_arch=ia32&set msbuild_platform=WIN32&set vs_toolset=x86&goto arg-ok
if /i "%1"=="x64" set target_arch=x64&set msbuild_platform=x64&set vs_toolset=x64&goto arg-ok
libuv/vcbuild.bat view on Meta::CPAN
if "%run%"=="" goto exit
echo running 'test\%config%\%run%'
test\%config%\%run%
goto exit
:create-msvs-files-failed
echo Failed to create vc project files.
exit /b 1
:help
echo vcbuild.bat [debug/release] [test/bench] [clean] [noprojgen] [nobuild] [vs2017] [x86/x64] [static/shared]
echo Examples:
echo vcbuild.bat : builds debug build
echo vcbuild.bat test : builds debug build and runs tests
echo vcbuild.bat release bench: builds release build and runs benchmarks
goto exit
:exit