realprocrastinator commented on PR #16942: URL: https://github.com/apache/nuttx/pull/16942#issuecomment-3241401618
> > > > @wangchdo could you review #16943? both path want to fix the similar problem. > > > > > > > > > Yes.. But i think it would be better to put the new API as the external api as i did > > > > > > From my perspective, the original design keeps the wait object as an internal implementation detail, hidden from the standard user (the kernel developer) API. Besides, the majority of users will not need this level of control, and a simpler interface is preferable for them and the issue that we are facing is highly specialized. Anyway, I‘m happy to discuss :-). > > Hi, @realprocrastinator In fact, I prefer to update the current implemention of nxevent_tickwait to let it default to use the wait object passed by the caller... and my fist patch did so, I amend my patch and choose to add a new api per @xiaoxiang781216 suggestion. > > I don't think we should hide wait object to user, because this object will be accessed by both event waiter thread and the event post thread, it is not good to put the object in the waiter thread's stack as a temporary variable, i think this is not safe. Well...I would prefer not changing the original API ro preserve the compatibility. However I'm open for the discussion whether we should expose the wait object. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org