Re: [PATCH V9 03/16] rv/include: Add helper functions for deterministic automata

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

 



On Sun, Jul 31, 2022 at 06:02:47PM +0200, Daniel Bristot de Oliveira wrote:
> On 7/31/22 17:13, Tao Zhou wrote:
> > On Fri, Jul 29, 2022 at 11:38:42AM +0200, Daniel Bristot de Oliveira wrote:
> > 
> > [...]
> > 
> >> +static inline type model_get_next_state_##name(enum states_##name curr_state,	\
> >> +					       enum events_##name event)	\
> >> +{										\
> >> +	if ((curr_state < 0) || (curr_state >= state_max_##name))		\
> >> +		return INVALID_STATE;						\
> >> +										\
> >> +	if ((event < 0) || (event >= event_max_##name))				\
> >> +		return INVALID_STATE;						\
> > 
> > Should define the INVALID_EVENT corresponding to event invalid case.
> 
> no.

Absolutly I lost here, this is for *get next state*, must return
a state info.

> 
> -- Daniel



[Index of Archives]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Linux FS]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux