search for: set_state

Displaying 20 results from an estimated 24 matches for "set_state".

Did you mean: set_cstate
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_...
2019 Jun 05
0
[PATCH libnbd 3/4] lib: Add set_state / get_state macros.
...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_state;\n"; + pr " set_state (h, next_state);\n"; pr " }\n"; pr " return r;\n"; pr "}\n"; @@ -2434,7 +2434,7 @@ let generate_lib_states_c () = pr " bool blocked;\n"; pr "\n"; pr " /* Validate and handle the external event. */\n";...
2019 Jun 05
1
Re: [PATCH libnbd 4/4] lib: Atomically update h->state when leaving the locked region.
On 6/5/19 8:03 AM, Richard W.M. Jones wrote: > On Wed, Jun 05, 2019 at 01:35:32PM +0100, Richard W.M. Jones wrote: >> 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 r...
2008 Jul 03
3
[PATCH 2/4] pvSCSI : Fix many points of backend/frontend driver
Please refer following Mr. Steven''s mail posted on June 24th. Message-ID: <20080624131313.GB18379@weybridge.uk.xensource.com> Message-ID: <20080624131256.GA18379@weybridge.uk.xensource.com> Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com> Signed-off-by: Jun Kamada <kama@jp.fujitsu.com> ----- Jun Kamada
2019 Jun 05
0
[PATCH libnbd 4/4] lib: Atomically update h->state when leaving the locked region.
...te = 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 lockless code. --- generator/generator | 23 +++++++++++++---------- lib/connect.c | 10 +++++----- li...
2008 May 13
8
static private and multi-inherit
/*author:csf178-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org*/ function Class(Initalizer,SuperClasses) { if(!SuperClasses)SuperClasses=[]; var ret=function(){ for(var i=0;i<SuperClasses.length;i++) { SuperClasses[i].call(this); } var $private={}; var $public=this; var $static=ret; with($static){ with($private){ with($public){
2019 Jun 05
1
[PATCH libnbd v2] lib: Atomically update h->state when leaving the locked region.
...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 to reason about the state in lockless code. --- generator/generator | 29 ++++++++++++++++------------- lib/connect.c | 10 +++++----- lib/disconnect.c | 8 ++++----...
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
2008 Jul 16
2
[PATCH] stopmachine: add stopmachine_timeout v2
...ses us, so we need this. */ -static unsigned int num_threads; +static atomic_t num_threads; static atomic_t thread_ack; +static cpumask_t prepared_cpus; static struct completion finished; static DEFINE_MUTEX(lock); +unsigned long stopmachine_timeout = 200; /* msecs, arbitrary */ + static void set_state(enum stopmachine_state newstate) { /* Reset ack counter. */ - atomic_set(&thread_ack, num_threads); + atomic_set(&thread_ack, atomic_read(&num_threads)); smp_wmb(); state = newstate; } @@ -67,6 +70,8 @@ static int stop_cpu(struct stop_machine_data *smdata) enum stopmachine_sta...
2008 Jul 16
2
[PATCH] stopmachine: add stopmachine_timeout v2
...ses us, so we need this. */ -static unsigned int num_threads; +static atomic_t num_threads; static atomic_t thread_ack; +static cpumask_t prepared_cpus; static struct completion finished; static DEFINE_MUTEX(lock); +unsigned long stopmachine_timeout = 200; /* msecs, arbitrary */ + static void set_state(enum stopmachine_state newstate) { /* Reset ack counter. */ - atomic_set(&thread_ack, num_threads); + atomic_set(&thread_ack, atomic_read(&num_threads)); smp_wmb(); state = newstate; } @@ -67,6 +70,8 @@ static int stop_cpu(struct stop_machine_data *smdata) enum stopmachine_sta...
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.
2008 Jul 17
1
[PATCH] stopmachine: add stopmachine_timeout v4
...*/ -static unsigned int num_threads; +static atomic_t num_threads; static atomic_t thread_ack; +static cpumask_t prepared_cpus; static struct completion finished; static DEFINE_MUTEX(lock); +unsigned long stopmachine_timeout; /* msecs, default is 0 = "never timeout" */ + static void set_state(enum stopmachine_state newstate) { /* Reset ack counter. */ - atomic_set(&thread_ack, num_threads); + atomic_set(&thread_ack, atomic_read(&num_threads)); smp_wmb(); state = newstate; } @@ -67,6 +70,8 @@ static int stop_cpu(struct stop_machine_data *smdata) enum stopmachine_sta...
2008 Jul 17
1
[PATCH] stopmachine: add stopmachine_timeout v4
...*/ -static unsigned int num_threads; +static atomic_t num_threads; static atomic_t thread_ack; +static cpumask_t prepared_cpus; static struct completion finished; static DEFINE_MUTEX(lock); +unsigned long stopmachine_timeout; /* msecs, default is 0 = "never timeout" */ + static void set_state(enum stopmachine_state newstate) { /* Reset ack counter. */ - atomic_set(&thread_ack, num_threads); + atomic_set(&thread_ack, atomic_read(&num_threads)); smp_wmb(); state = newstate; } @@ -67,6 +70,8 @@ static int stop_cpu(struct stop_machine_data *smdata) enum stopmachine_sta...
2019 Jun 08
0
[PATCH libnbd v3] lib: Atomically update h->state when leaving the locked region.
...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 to reason about the state in lockless code. --- generator/generator | 87 ++++++++++++++++++++++++++++----------------- lib/connect.c | 10 +++--- lib/disconnect.c |...
2019 Jun 05
0
Re: [PATCH libnbd 4/4] lib: Atomically update h->state when leaving the locked region.
On Wed, Jun 05, 2019 at 01:35:32PM +0100, Richard W.M. Jones wrote: > 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...
2003 Nov 12
1
ADSI Functions
Does anyone know where I can get a list of ADSI functions.. Example *70 (No Call Waiting), Flash = Flash, Hold = ??? Thank you, -gcc
2011 May 03
3
Issue with geo-replication and nfs auth
hi, I've some issue with geo-replication (since 3.2.0) and nfs auth (since initial release). Geo-replication --------------- System : Debian 6.0 amd64 Glusterfs: 3.2.0 MASTER (volume) => SLAVE (directory) For some volume it works, but for others i can't enable geo-replication and have this error with a faulty status: 2011-05-03 09:57:40.315774] E
2013 Oct 08
1
[PATCH] drm/nouveau: suspend to D3hot, not to D3cold
In the autumn and winter it's considered bad form to set power state to D3cold, it might cause the device to freeze to death. This is also the case in the other seasons, so any device in the southern hemisphere is affected too. D3cold is not a valid state in a call to pci_set_power_state, only up to D3hot is allowed. Signed-off-by: Maarten Lankhorst <maarten.lankhorst at canonical.com>
2009 Oct 18
1
[PATCH 1/2] nv04-nv40/crtc: Don't perform the LUT expansion twice.
...t;> 8; - rgbs[i].g = green[i] >> 8; - rgbs[i].b = blue[i] >> 8; - } + for (i = 0; i < 256; i++) { + rgbs[i].r = red[i] >> 8; + rgbs[i].g = green[i] >> 8; + rgbs[i].b = blue[i] >> 8; } nouveau_hw_load_state_palette(pNv, nv_crtc->head, &pNv->set_state); -- 1.6.4.4
2011 Jul 25
1
Problem with Gluster Geo Replication, status faulty
...atus MASTER SLAVE STATUS -------------------------------------------------------------------------------- flvol ssh://root at ec2-67-202-22-159.compute-1.amazonaws.com:file:///mnt/slave faulty The log file has the following entry: [2011-07-25 19:01:55.217725] I [monitor(monitor):19:set_state] Monitor: new state: starting... [2011-07-25 19:01:55.235734] I [monitor(monitor):42:monitor] Monitor: ------------------------------------------------------------ [2011-07-25 19:01:55.235909] I [monitor(monitor):43:monitor] Monitor: starting gsyncd worker [2011-07-25 19:01:55.295624] I [gsyncd:286...