| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -224,3 +224,4 @@ Jianghua Yang <jianghua.yjh@alibaba-inc.com> | |||
| 224 | 224 | Colin Snover <github.com@zetafleet.com> | |
| 225 | 225 | Sakthipriyan Vairamani <thechargingvolcano@gmail.com> | |
| 226 | 226 | Eli Skeggs <skeggse@gmail.com> | |
| 227 | + nmushell <nmushell@bloomberg.net> | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,3 +1,24 @@ | |||
| 1 | + 2015.09.23, Version 1.7.5 (Stable), a8c1136de2cabf25b143021488cbaab05834daa8 | ||
| 2 | + | ||
| 3 | + Changes since version 1.7.4: | ||
| 4 | + | ||
| 5 | + * unix: Support atomic compare & swap xlC on AIX (nmushell) | ||
| 6 | + | ||
| 7 | + * unix: Fix including uv-aix.h on AIX (nmushell) | ||
| 8 | + | ||
| 9 | + * unix: consolidate rwlock tryrdlock trywrlock errors (Saúl Ibarra Corretgé) | ||
| 10 | + | ||
| 11 | + * unix, win: consolidate mutex trylock errors (Saúl Ibarra Corretgé) | ||
| 12 | + | ||
| 13 | + * darwin: fix memory leak in uv_cpu_info (Jianghua Yang) | ||
| 14 | + | ||
| 15 | + * test: add tests for the uv_rwlock implementation (Bert Belder) | ||
| 16 | + | ||
| 17 | + * win: redo/fix the uv_rwlock APIs (Bert Belder) | ||
| 18 | + | ||
| 19 | + * win: don't fetch function pointers to SRWLock APIs (Bert Belder) | ||
| 20 | + | ||
| 21 | + | ||
| 1 | 22 | 2015.09.12, Version 1.7.4 (Stable), a7ad4f52189d89cfcba35f78bfc5ff3b1f4105c4 | |
| 2 | 23 | ||
| 3 | 24 | Changes since version 1.7.3: | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -280,6 +280,7 @@ endif | |||
| 280 | 280 | ||
| 281 | 281 | if AIX | |
| 282 | 282 | libuv_la_CFLAGS += -D_ALL_SOURCE -D_XOPEN_SOURCE=500 -D_LINUX_SOURCE_COMPAT | |
| 283 | + include_HEADERS += include/uv-aix.h | ||
| 283 | 284 | libuv_la_SOURCES += src/unix/aix.c | |
| 284 | 285 | endif | |
| 285 | 286 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,4 +1,4 @@ | |||
| 1 | - version: v1.7.4.build{build} | ||
| 1 | + version: v1.7.5.build{build} | ||
| 2 | 2 | ||
| 3 | 3 | install: | |
| 4 | 4 | - cinst -y nsis | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -13,7 +13,7 @@ | |||
| 13 | 13 | # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
| 14 | 14 | ||
| 15 | 15 | AC_PREREQ(2.57) | |
| 16 | - AC_INIT([libuv], [1.7.4], [https://github.com/libuv/libuv/issues]) | ||
| 16 | + AC_INIT([libuv], [1.7.5], [https://github.com/libuv/libuv/issues]) | ||
| 17 | 17 | AC_CONFIG_MACRO_DIR([m4]) | |
| 18 | 18 | m4_include([m4/libuv-extra-automake-flags.m4]) | |
| 19 | 19 | m4_include([m4/as_case.m4]) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -32,7 +32,7 @@ | |||
| 32 | 32 | ||
| 33 | 33 | #define UV_VERSION_MAJOR 1 | |
| 34 | 34 | #define UV_VERSION_MINOR 7 | |
| 35 | - #define UV_VERSION_PATCH 4 | ||
| 35 | + #define UV_VERSION_PATCH 5 | ||
| 36 | 36 | #define UV_VERSION_IS_RELEASE 1 | |
| 37 | 37 | #define UV_VERSION_SUFFIX "" | |
| 38 | 38 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -246,22 +246,20 @@ typedef union { | |||
| 246 | 246 | } uv_cond_t; | |
| 247 | 247 | ||
| 248 | 248 | typedef union { | |
| 249 | - /* srwlock_ has type SRWLOCK, but not all toolchains define this type in */ | ||
| 250 | - /* windows.h. */ | ||
| 251 | - SRWLOCK srwlock_; | ||
| 252 | 249 | struct { | |
| 253 | - union { | ||
| 254 | - CRITICAL_SECTION cs; | ||
| 255 | - /* TODO: remove me in v2.x. */ | ||
| 256 | - uv_mutex_t unused; | ||
| 257 | - } read_lock_; | ||
| 258 | - union { | ||
| 259 | - HANDLE sem; | ||
| 260 | - /* TODO: remove me in v2.x. */ | ||
| 261 | - uv_mutex_t unused; | ||
| 262 | - } write_lock_; | ||
| 263 | 250 | unsigned int num_readers_; | |
| 264 | - } fallback_; | ||
| 251 | + CRITICAL_SECTION num_readers_lock_; | ||
| 252 | + HANDLE write_semaphore_; | ||
| 253 | + } state_; | ||
| 254 | + /* TODO: remove me in v2.x. */ | ||
| 255 | + struct { | ||
| 256 | + SRWLOCK unused_; | ||
| 257 | + } unused1_; | ||
| 258 | + /* TODO: remove me in v2.x. */ | ||
| 259 | + struct { | ||
| 260 | + uv_mutex_t unused1_; | ||
| 261 | + uv_mutex_t unused2_; | ||
| 262 | + } unused2_; | ||
| 265 | 263 | } uv_rwlock_t; | |
| 266 | 264 | ||
| 267 | 265 | typedef struct { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -33,6 +33,10 @@ UV_UNUSED(static int cmpxchgi(int* ptr, int oldval, int newval)) { | |||
| 33 | 33 | : "r" (newval), "0" (oldval) | |
| 34 | 34 | : "memory"); | |
| 35 | 35 | return out; | |
| 36 | + #elif defined(_AIX) && defined(__xlC__) | ||
| 37 | + const int out = (*(volatile int*) ptr); | ||
| 38 | + __compare_and_swap(ptr, &oldval, newval); | ||
| 39 | + return out; | ||
| 36 | 40 | #else | |
| 37 | 41 | return __sync_val_compare_and_swap(ptr, oldval, newval); | |
| 38 | 42 | #endif | |
@@ -46,6 +50,14 @@ UV_UNUSED(static long cmpxchgl(long* ptr, long oldval, long newval)) { | |||
| 46 | 50 | : "r" (newval), "0" (oldval) | |
| 47 | 51 | : "memory"); | |
| 48 | 52 | return out; | |
| 53 | + #elif defined(_AIX) && defined(__xlC__) | ||
| 54 | + const long out = (*(volatile int*) ptr); | ||
| 55 | + # if defined(__64BIT__) | ||
| 56 | + __compare_and_swaplp(ptr, &oldval, newval); | ||
| 57 | + # else | ||
| 58 | + __compare_and_swap(ptr, &oldval, newval); | ||
| 59 | + # endif /* if defined(__64BIT__) */ | ||
| 60 | + return out; | ||
| 49 | 61 | #else | |
| 50 | 62 | return __sync_val_compare_and_swap(ptr, oldval, newval); | |
| 51 | 63 | #endif | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -199,8 +199,10 @@ int uv_cpu_info(uv_cpu_info_t** cpu_infos, int* count) { | |||
| 199 | 199 | } | |
| 200 | 200 | ||
| 201 | 201 | *cpu_infos = uv__malloc(numcpus * sizeof(**cpu_infos)); | |
| 202 | - if (!(*cpu_infos)) | ||
| 203 | - return -ENOMEM; /* FIXME(bnoordhuis) Deallocate info? */ | ||
| 202 | + if (!(*cpu_infos)) { | ||
| 203 | + vm_deallocate(mach_task_self(), (vm_address_t)info, msg_type); | ||
| 204 | + return -ENOMEM; | ||
| 205 | + } | ||
| 204 | 206 | ||
| 205 | 207 | *count = numcpus; | |
| 206 | 208 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -124,14 +124,14 @@ void uv_mutex_lock(uv_mutex_t* mutex) { | |||
| 124 | 124 | int uv_mutex_trylock(uv_mutex_t* mutex) { | |
| 125 | 125 | int err; | |
| 126 | 126 | ||
| 127 | - /* FIXME(bnoordhuis) EAGAIN means recursive lock limit reached. Arguably | ||
| 128 | - * a bug, should probably abort rather than return -EAGAIN. | ||
| 129 | - */ | ||
| 130 | 127 | err = pthread_mutex_trylock(mutex); | |
| 131 | - if (err && err != EBUSY && err != EAGAIN) | ||
| 132 | - abort(); | ||
| 128 | + if (err) { | ||
| 129 | + if (err != EBUSY && err != EAGAIN) | ||
| 130 | + abort(); | ||
| 131 | + return -EBUSY; | ||
| 132 | + } | ||
| 133 | 133 | ||
| 134 | - return -err; | ||
| 134 | + return 0; | ||
| 135 | 135 | } | |
| 136 | 136 | ||
| 137 | 137 | ||
@@ -162,10 +162,13 @@ int uv_rwlock_tryrdlock(uv_rwlock_t* rwlock) { | |||
| 162 | 162 | int err; | |
| 163 | 163 | ||
| 164 | 164 | err = pthread_rwlock_tryrdlock(rwlock); | |
| 165 | - if (err && err != EBUSY && err != EAGAIN) | ||
| 166 | - abort(); | ||
| 165 | + if (err) { | ||
| 166 | + if (err != EBUSY && err != EAGAIN) | ||
| 167 | + abort(); | ||
| 168 | + return -EBUSY; | ||
| 169 | + } | ||
| 167 | 170 | ||
| 168 | - return -err; | ||
| 171 | + return 0; | ||
| 169 | 172 | } | |
| 170 | 173 | ||
| 171 | 174 | ||
@@ -185,10 +188,13 @@ int uv_rwlock_trywrlock(uv_rwlock_t* rwlock) { | |||
| 185 | 188 | int err; | |
| 186 | 189 | ||
| 187 | 190 | err = pthread_rwlock_trywrlock(rwlock); | |
| 188 | - if (err && err != EBUSY && err != EAGAIN) | ||
| 189 | - abort(); | ||
| 191 | + if (err) { | ||
| 192 | + if (err != EBUSY && err != EAGAIN) | ||
| 193 | + abort(); | ||
| 194 | + return -EBUSY; | ||
| 195 | + } | ||
| 190 | 196 | ||
| 191 | - return -err; | ||
| 197 | + return 0; | ||
| 192 | 198 | } | |
| 193 | 199 | ||
| 194 | 200 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments