On Tuesday, October 25, 2016 9:48:22 AM CEST Jason Gunthorpe wrote:
>
> Using a completion to model exclusive ownership seems convoluted to
> me - is that a thing now? What about an atomic?
I also totally missed how this is used. I initially mentioned to Binoy
that almost all semaphores can
On Tuesday, October 25, 2016 9:48:22 AM CEST Jason Gunthorpe wrote:
>
> Using a completion to model exclusive ownership seems convoluted to
> me - is that a thing now? What about an atomic?
I also totally missed how this is used. I initially mentioned to Binoy
that almost all semaphores can
On Tue, Oct 25, 2016 at 08:38:21PM +0530, Binoy Jayan wrote:
> On 25 October 2016 at 18:13, Jack Wang wrote:
> > Hi Binoy,
> >
> > snip
> >>
> >> port->ib_dev = device;
> >> port->port_num = port_num;
> >> - sema_init(>sm_sem, 1);
> >> +
On Tue, Oct 25, 2016 at 08:38:21PM +0530, Binoy Jayan wrote:
> On 25 October 2016 at 18:13, Jack Wang wrote:
> > Hi Binoy,
> >
> > snip
> >>
> >> port->ib_dev = device;
> >> port->port_num = port_num;
> >> - sema_init(>sm_sem, 1);
> >> + init_completion(>sm_comp);
>
Hi Binoy,
2016-10-25 17:08 GMT+02:00 Binoy Jayan :
> On 25 October 2016 at 18:13, Jack Wang wrote:
>> Hi Binoy,
>>
>> snip
>>>
>>> port->ib_dev = device;
>>> port->port_num = port_num;
>>> - sema_init(>sm_sem, 1);
>>> +
Hi Binoy,
2016-10-25 17:08 GMT+02:00 Binoy Jayan :
> On 25 October 2016 at 18:13, Jack Wang wrote:
>> Hi Binoy,
>>
>> snip
>>>
>>> port->ib_dev = device;
>>> port->port_num = port_num;
>>> - sema_init(>sm_sem, 1);
>>> + init_completion(>sm_comp);
>>> +
On 25 October 2016 at 18:13, Jack Wang wrote:
> Hi Binoy,
>
> snip
>>
>> port->ib_dev = device;
>> port->port_num = port_num;
>> - sema_init(>sm_sem, 1);
>> + init_completion(>sm_comp);
>> + complete(>sm_comp);
>
> Why complete here?
>
>>
On 25 October 2016 at 18:13, Jack Wang wrote:
> Hi Binoy,
>
> snip
>>
>> port->ib_dev = device;
>> port->port_num = port_num;
>> - sema_init(>sm_sem, 1);
>> + init_completion(>sm_comp);
>> + complete(>sm_comp);
>
> Why complete here?
>
>>
Hi Binoy,
snip
>
> port->ib_dev = device;
> port->port_num = port_num;
> - sema_init(>sm_sem, 1);
> + init_completion(>sm_comp);
> + complete(>sm_comp);
Why complete here?
> mutex_init(>file_mutex);
> INIT_LIST_HEAD(>file_list);
>
> --
KR,
Hi Binoy,
snip
>
> port->ib_dev = device;
> port->port_num = port_num;
> - sema_init(>sm_sem, 1);
> + init_completion(>sm_comp);
> + complete(>sm_comp);
Why complete here?
> mutex_init(>file_mutex);
> INIT_LIST_HEAD(>file_list);
>
> --
KR,
The semaphore 'sm_sem' is used as completion, so convert it to
struct completion. Semaphores are going away in the future. The initial
status of the completion variable is marked as completed by a call to
the function 'complete' immediately following the initialization.
Signed-off-by: Binoy Jayan
The semaphore 'sm_sem' is used as completion, so convert it to
struct completion. Semaphores are going away in the future. The initial
status of the completion variable is marked as completed by a call to
the function 'complete' immediately following the initialization.
Signed-off-by: Binoy Jayan
12 matches
Mail list logo