diff options
| author | Michael Biebl <biebl@debian.org> | 2018-07-01 20:58:23 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2018-07-01 20:58:23 +0200 |
| commit | 429393567647935d9123e21fd27a7529d50255eb (patch) | |
| tree | b5a99bf0cbbe77fccd7fee81caf71915ccf9eb96 /shared/nm-utils | |
| parent | 069cb5c3a525ebcc19cc2927964258acaca87b13 (diff) | |
New upstream version 1.12.0 upstream/1.12.0
Diffstat (limited to 'shared/nm-utils')
| -rw-r--r-- | shared/nm-utils/nm-shared-utils.h | 3 | ||||
| -rw-r--r-- | shared/nm-utils/nm-test-utils.h | 8 |
2 files changed, 10 insertions, 1 deletions
diff --git a/shared/nm-utils/nm-shared-utils.h b/shared/nm-utils/nm-shared-utils.h index 58855237..d983cfcd 100644 --- a/shared/nm-utils/nm-shared-utils.h +++ b/shared/nm-utils/nm-shared-utils.h @@ -331,6 +331,7 @@ _nm_g_slice_free_fcn_define (1) _nm_g_slice_free_fcn_define (2) _nm_g_slice_free_fcn_define (4) _nm_g_slice_free_fcn_define (8) +_nm_g_slice_free_fcn_define (10) _nm_g_slice_free_fcn_define (12) _nm_g_slice_free_fcn_define (16) @@ -345,6 +346,7 @@ _nm_g_slice_free_fcn_define (16) || ((mem_size) == 2) \ || ((mem_size) == 4) \ || ((mem_size) == 8) \ + || ((mem_size) == 10) \ || ((mem_size) == 12) \ || ((mem_size) == 16)); \ switch ((mem_size)) { \ @@ -352,6 +354,7 @@ _nm_g_slice_free_fcn_define (16) case 2: _fcn = _nm_g_slice_free_fcn_2; break; \ case 4: _fcn = _nm_g_slice_free_fcn_4; break; \ case 8: _fcn = _nm_g_slice_free_fcn_8; break; \ + case 10: _fcn = _nm_g_slice_free_fcn_10; break; \ case 12: _fcn = _nm_g_slice_free_fcn_12; break; \ case 16: _fcn = _nm_g_slice_free_fcn_16; break; \ default: g_assert_not_reached (); _fcn = NULL; break; \ diff --git a/shared/nm-utils/nm-test-utils.h b/shared/nm-utils/nm-test-utils.h index efbe6c9a..efb41454 100644 --- a/shared/nm-utils/nm-test-utils.h +++ b/shared/nm-utils/nm-test-utils.h @@ -145,10 +145,16 @@ const gint64 nmtst_wait_start_us = g_get_monotonic_time (); \ const gint64 nmtst_wait_duration_us = (max_wait_ms) * 1000L; \ const gint64 nmtst_wait_end_us = nmtst_wait_start_us + nmtst_wait_duration_us; \ + gint64 _nmtst_wait_remaining_us = nmtst_wait_duration_us; \ + int _nmtst_wait_iteration = 0; \ \ while (TRUE) { \ + _nm_unused const gint64 nmtst_wait_remaining_us = _nmtst_wait_remaining_us; \ + _nm_unused int nmtst_wait_iteration = _nmtst_wait_iteration++; \ + \ { wait }; \ - if (g_get_monotonic_time () > nmtst_wait_end_us) { \ + _nmtst_wait_remaining_us = (nmtst_wait_end_us - g_get_monotonic_time ()); \ + if (_nmtst_wait_remaining_us <= 0) { \ _not_expired = FALSE; \ break; \ } \ |