Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [tcf-dev] Run Control state changes while suspended

Hi Anders,

Yes, suspended context should not change. Clients expect it to remain in a sort of a frozen state.
You can either delay reporting the change until the context is resumed, or send started, changed and stopped events, like this:

void my_context_changed(Context * ctx) {
    int stopped = ctx->stopped;
    int intercepted = is_intercepted(ctx);
    if (stopped) {
        ctx->exiting = 1;
        send_context_started_event(ctx);
        post_my_context_stop_event(ctx); // Asynchronously calls send_context_stopped_event() when you done with all changes
    }
    if (intercepted) {
        ctx->pending_intercept = 1;
    }
    ctx->exiting = 0;
    send_context_changed_event(ctx);
}

Regards,
Eugene

-----Original Message-----
From: tcf-dev-bounces@xxxxxxxxxxx [mailto:tcf-dev-bounces@xxxxxxxxxxx] On Behalf Of Conradi, Anders
Sent: Thursday, July 26, 2018 2:22 AM
To: TCF Development <tcf-dev@xxxxxxxxxxx>
Subject: [tcf-dev] Run Control state changes while suspended

EXTERNAL EMAIL

Hi,

I'm reading through the specification for the Run Control service and I notice that it explicitly states that the contextStateChanged event is not sent while a context is suspended. So how is the client supposed to know when the state changes while a context is suspended? In our case this is when we configure our OS awareness system and a processor context gets an associated thread context. (The thread context also gets information about the CPU, but that is a new context, so it is not a problem).

Regards,
Anders

----------------------------------------------------------------------
Intel Sweden AB
Registered Office: Isafjordsgatan 30B, 164 40 Kista, Stockholm, Sweden
Registration Number: 556189-6027

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

_______________________________________________
tcf-dev mailing list
tcf-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/tcf-dev


Back to the top