[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] pkl: Remove global state from IOS
From: |
Jose E. Marchesi |
Subject: |
Re: [PATCH] pkl: Remove global state from IOS |
Date: |
Mon, 20 Dec 2021 22:12:16 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
Hi Mohammad.
Thanks for the patch.
> This patch removes global state from IOS by introducing a new struct
> `ios_meta`.
I would much prefer to use the name `ios_context' for this type, or
`ios_ctx' if you want it shorter.
> I'll send another patch later for removing global termif.
> I think, not having a global state is a good thing. With no global state,
> one can run `libpoke` instances in different threads, safely. Also a program
> using `libpoke` can use a library that uses `libpoke` itself.
>
> I changed `open` function pointer of `struct pk_iod_if` to be compatible
> with the rest of world. But user doesn't need (and should not care about
> this new first parameter). I don't like this new unused parameter here.
> WDYT?
Huh, why would you want to pass the ios context to the IOD implementations?
[PATCH v2 1/2] pkl: Add user_data in IO device API, Mohammad-Reza Nabipoor, 2021/12/23