search for: get_state

Displaying 20 results from an estimated 95 matches for "get_state".

Did you mean: get_stats
2019 Jun 05
0
[PATCH libnbd 3/4] lib: Add set_state / get_state macros.
...+2415,11 @@ let generate_lib_states_c () = pr " enum state next_state = %s;\n" state_enum; pr "\n"; pr " r = _enter_%s (h, &next_state, blocked);\n" state_enum; - pr " if (h->state != next_state) {\n"; + pr " if (get_state (h) != next_state) {\n"; pr " debug (h, \"transition: %%s -> %%s\",\n"; pr " \"%s\",\n" display_name; pr " nbd_internal_state_short_string (next_state));\n"; - pr " h->state = next_...
2019 Jun 05
0
[PATCH libnbd 4/4] lib: Atomically update h->state when leaving the locked region.
Split h->state into: - h->state = the state on entry to the locked region - h->next_state = the current state and what the "publicly visible" state will become when we leave the locked region Some calls to get_state become calls to get_next_state depending on which of these they are trying to read. Calls to set_state become set_next_state because that is what gets updated. When we leave the locked region we update h->state. The purpose of this patch is to make it easier to reason about the state in lockl...
2019 Jun 05
1
[PATCH libnbd v2] lib: Atomically update h->state when leaving the locked region.
...;state = the real current state of the handle When we leave the locked region we update h->public_state with h->state, so that from outside the lock the handle appears to move atomically from its previous state to the final state without going through any intermediate states. Some calls to ‘get_state’ become calls to ‘get_next_state’ if the need the real state. Others which need to see the publicly visible state are changed to ‘get_public_state’. All calls to ‘set_state’ become ‘set_next_state’ because that is the real state that gets updated. The purpose of this patch is to make it easier t...
2019 Jun 08
0
[PATCH libnbd v3] lib: Atomically update h->state when leaving the locked region.
...;state = the real current state of the handle When we leave the locked region we update h->public_state with h->state, so that from outside the lock the handle appears to move atomically from its previous state to the final state without going through any intermediate states. Some calls to ‘get_state’ become calls to ‘get_next_state’ if the need the real state. Others which need to see the publicly visible state are changed to ‘get_public_state’. All calls to ‘set_state’ become ‘set_next_state’ because that is the real state that gets updated. The purpose of this patch is to make it easier t...
2019 Jun 05
9
[PATCH libnbd 0/4] lib: Atomically update h->state.
I need to think about this patch series a bit more, but it does at least pass the tests. Rich.
2019 Jun 08
4
[PATCH libnbd v3] lib: Atomically update h->state when leaving the locked region.
v1 was here: https://www.redhat.com/archives/libguestfs/2019-June/thread.html#00055 v2 was here: https://www.redhat.com/archives/libguestfs/2019-June/thread.html#00067 v3: - Fix atomicly -> atomically in commit message. - Fix a comment. - Fix TOCTTOU: There is now an inline function generated called <name>_is_permitted_state, and this is called twice, first outside the
2002 Dec 20
0
Compilation warning on 2.2.7a
It seems pretty typical that compilation warnings can be essentially ignored. Be that as it may, if I can't find evidence that a warning can be ignored in the archives, I am compelled to ask about it. A nod that these are OK or a fix for them if they are not OK would be appreciated. I am getting several warnings with winbind_nss.c : Compiling nsswitch/winbind_nss.c with -fPIC
2019 Jun 05
2
Re: [PATCH libnbd 4/4] lib: Atomically update h->state when leaving the locked region.
On Wed, Jun 05, 2019 at 12:15:37PM +0100, Richard W.M. Jones wrote: > -#define set_state(h,next_state) ((h)->state) = (next_state) > +#define set_next_state(h,_next_state) ((h)->next_state) = (_next_state) > +#define get_next_state(h) ((h)->next_state) > #define get_state(h) ((h)->state) So I wonder if it's better to rename get_state as get_last_state or get_visible_state? And/or rename get_next_state/set_next_state to get_state/set_state? Ideas welcome to make the code clearer. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat....
2019 Jun 05
1
Re: [PATCH libnbd 4/4] lib: Atomically update h->state when leaving the locked region.
...019 at 12:15:37PM +0100, Richard W.M. Jones wrote: >>> -#define set_state(h,next_state) ((h)->state) = (next_state) >>> +#define set_next_state(h,_next_state) ((h)->next_state) = (_next_state) >>> +#define get_next_state(h) ((h)->next_state) >>> #define get_state(h) ((h)->state) >> >> So I wonder if it's better to rename get_state as get_last_state or >> get_visible_state? > > Or even get_public_state? get_public_state sounds nice (the state that nbd_connection_state will return). > >> And/or rename get_next_state...
2003 Feb 05
7
Winbind on HPUX 11, some small progress
Hi All, Well, i've managed to enable some debugging in syslog, I had to put in /etc/syslog.conf ;*.debug on the syslog line. So at least I have an error which is being returned into syslog from winbind. This is what I get from winbind Feb 4 21:13:17 coastdr pam_winbind[20753]: Verify user `lonnie' Feb 4 21:13:18 coastdr pam_winbind[20753]: user 'lonnie' granted acces Feb 4
2006 Sep 06
2
Getting subframe type=verbatim on 16 bit files
...n false; // bad settings for doing this compression so quit... // shoot the final data buffer to the encoder.... // we would have called process_interleaved if we had not created an array per channel above... if (!flacCompressor.DoProcess()) { flacState = flacCompressor.get_state(); return false; } flacState = flacCompressor.get_state(); flacCompressor.finish(); flacCompressor.Release(); return true; } ******************************************** This message is intended only for the use of the Addressee and may contain infor...
2019 Jun 05
0
Re: [PATCH libnbd 4/4] lib: Atomically update h->state when leaving the locked region.
...d, Jun 05, 2019 at 12:15:37PM +0100, Richard W.M. Jones wrote: > > -#define set_state(h,next_state) ((h)->state) = (next_state) > > +#define set_next_state(h,_next_state) ((h)->next_state) = (_next_state) > > +#define get_next_state(h) ((h)->next_state) > > #define get_state(h) ((h)->state) > > So I wonder if it's better to rename get_state as get_last_state or > get_visible_state? Or even get_public_state? > And/or rename get_next_state/set_next_state to > get_state/set_state? > > Ideas welcome to make the code clearer. Rich. -- Rich...
2006 Feb 01
1
R CMD check barfs at 'suggested' package
I have been running R CMD check for the first time on of our own packages, which otherwise builds, installs and runs just fine. The package depends on package akima and suggests package multtest; suggesting multtest is indicated because a) it loads a lot of other Bioconductor packages, very slowly, and b) it is only needed for one specific subroutine, which executes require(multtest)
2006 Sep 06
0
Getting subframe type=verbatim on 16 bit files
...ession so > quit... > > // shoot the final data buffer to the encoder.... > // we would have called process_interleaved if we had not created > an > array per channel above... > if (!flacCompressor.DoProcess()) > { > flacState = flacCompressor.get_state(); > return false; > } > > flacState = flacCompressor.get_state(); > flacCompressor.finish(); > > flacCompressor.Release(); > > return true; > } __________________________________________________ Do You Yahoo!? Tired of spam...
2004 Nov 10
2
Reset Statistics?
2011 Sep 28
0
FLAC::Encoder::Stream == "FLAC__STREAM_ENCODER_VERIFY_MISMATCH_IN_AUDIO_DATA"
I'm using flac-1.2.1 and visual studio 2010 on windows xp sp3 and I want to compress raw CDDA with the stream encoder to a file. But I just can't get the flac encoder to work, the encoder always returns an error enc.get_state() == "FLAC__STREAM_ENCODER_VERIFY_MISMATCH_IN_AUDIO_DATA" get_verify_decoder_state() == "FLAC__STREAM_DECODER_READ_FRAME" this is the code I have now /*****************************************************************************/ FLAC__StreamEncoderInitStatus init_status...
2019 Jun 05
2
Re: [PATCH libnbd 4/4] lib: Atomically update h->state when leaving the locked region.
...he state visible to unlocked code and h->state for internal while still locked; I trust that once you pick a naming scheme you like, you can redo this patch accordingly. I'll go ahead and review the changes as spelled here to at least see if I can spot any problems. > > Some calls to get_state become calls to get_next_state depending on > which of these they are trying to read. Calls to set_state become > set_next_state because that is what gets updated. > > When we leave the locked region we update h->state. > > The purpose of this patch is to make it easier to r...
2004 Sep 10
2
FLAC++ SeekableStream write_callback not being called?
...method will take data from the beginning. internalBuffer->at(0); return FLAC__STREAM_DECODER_WRITE_STATUS_CONTINUE; } And the code which I expect to have call it is (where "d" is an instance of my K3bFLACDecoder::Private class) : if(d->internalBuffer == 0) { if(d->get_state() == FLAC__SEEKABLE_STREAM_DECODER_END_OF_STREAM) { // Nothing left to do. return 0; } else { // Get some more data into our internal buffer. d->process_single(); } } Yet my internalBuffer is never initialised. I have also tried to have: while(d->internalB...
2016 Mar 18
4
[PATCH] gpu/drm: Use u64_to_user_pointer
...rm/vc4/vc4_gem.c index 8d4384f..89d7931 100644 --- a/drivers/gpu/drm/vc4/vc4_gem.c +++ b/drivers/gpu/drm/vc4/vc4_gem.c @@ -120,7 +120,7 @@ vc4_get_hang_state_ioctl(struct drm_device *dev, void *data, bo_state[i].size = vc4_bo->base.base.size; } - if (copy_to_user((void __user *)(uintptr_t)get_state->bo, + if (copy_to_user(u64_to_user_ptr(get_state->bo), bo_state, state->bo_count * sizeof(*bo_state))) ret = -EFAULT; @@ -550,7 +550,7 @@ vc4_cl_lookup_bos(struct drm_device *dev, } ret = copy_from_user(handles, - (void __user *)(uintptr_t)args->bo_handles, +...
2016 Mar 18
4
[PATCH] gpu/drm: Use u64_to_user_pointer
...rm/vc4/vc4_gem.c index 8d4384f..89d7931 100644 --- a/drivers/gpu/drm/vc4/vc4_gem.c +++ b/drivers/gpu/drm/vc4/vc4_gem.c @@ -120,7 +120,7 @@ vc4_get_hang_state_ioctl(struct drm_device *dev, void *data, bo_state[i].size = vc4_bo->base.base.size; } - if (copy_to_user((void __user *)(uintptr_t)get_state->bo, + if (copy_to_user(u64_to_user_ptr(get_state->bo), bo_state, state->bo_count * sizeof(*bo_state))) ret = -EFAULT; @@ -550,7 +550,7 @@ vc4_cl_lookup_bos(struct drm_device *dev, } ret = copy_from_user(handles, - (void __user *)(uintptr_t)args->bo_handles, +...