tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Introduce curlwp_bind and curlwp_unbind for psref(9)



On Wed, Jun 15, 2016 at 11:44 AM, Ryota Ozaki <ozaki-r%netbsd.org@localhost> wrote:
> On Wed, Jun 15, 2016 at 11:29 AM, David Young <dyoung%pobox.com@localhost> wrote:
>> On Wed, Jun 15, 2016 at 10:56:57AM +0900, Ryota Ozaki wrote:
>>> On Tue, Jun 14, 2016 at 7:58 PM, Joerg Sonnenberger <joerg%bec.de@localhost> wrote:
>>> > On Tue, Jun 14, 2016 at 09:53:33AM +0900, Ryota Ozaki wrote:
>>> >> - curlwp_bind and curlwp_unbind
>>> >> - curlwp_bound_set and curlwp_bound_restore
>>> >> - curlwp_bound and curlwp_boundx
>>> >>
>>> >> Any other ideas? :)
>>> >
>>> > curlwp_bind_push / curlwp_bind_pop
>>>
>>> Hmm, I think the naming fits in if Linux, but not in NetBSD.
>>> And
>>>   bound = curlwp_bind_push();
>>>   ...
>>>   curlwp_bind_pop(bound);
>>> looks odd to me.
>>
>> bound = curlwp_bind_get(); curlwp_bind_put(bound)?

Oops.

> I think it's stepping away from the API's intention. The API
> actually sets and restores a flag. The return value (and the
                ^^^^^^^^^^^^^^^^^^^
                a flag and restores an original state
is correct.

> argument) is a secondary product and the API name perhaps
> shouldn't reflect it.
>
>   ozaki-r


Home | Main Index | Thread Index | Old Index