Hi Hongwei,

On Mon, Jun 13, 2016 at 1:04 PM, gmhwxi <[email protected]> wrote:
> You need to the following annotation:
>
> if :(pss: chss(chss_ilock)) =>
>   true then chEvtBroadcastI (pss | inserted_event_p)
>
> If no annotation is given, then the following default is assumed:
>
> if :(pss: chss(chss_isr)) =>
>   true then chEvtBroadcastI (pss | inserted_event_p)
>
> This is due to 'pss' being originally given the type chss(chss_isr)

Umm...
The `pss` is introduced as `chss(chss_isr)` at the `tmrfunc` function.
However the `chEvtBroadcastI` function doesn't know that it was
changed into `chss(chss_ilock)`?
If so, how does `chSysUnlockFromISR` function know the changing?

> If you do:
>
> prval pss2 = pss
>
> then the 'original' type for pss2 is chss(chss_isr). So if you use
> pss2, you do not need to provide an explicit state type annotation.

I think it makes sense.
Does it mean that 'initial' type of linear type is only used in if expression?

Best regards,
-- 
Kiwamu Okabe at METASEPI DESIGN

-- 
You received this message because you are subscribed to the Google Groups 
"ats-lang-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/ats-lang-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/ats-lang-users/CAEvX6dnOcBHMqRVDiT7ex%3DTGpknx%3DdGxQbwuGcz3DgD0TFq9sw%40mail.gmail.com.

Reply via email to