lkml.org 
[lkml]   [2006]   [Oct]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: stopping a process during a timer interrupt
    * Kay Tiong Khoo | 2006-10-17 18:18:25 [+0800]:

    >On a timer interrupt, I tried to stop the current process by changing
    >it's run state to TASK_STOPPED via set_current_state(TASK_STOPPED).
    >However, this results in a system hang.
    >
    >I can't find a way to stop the current process during an interrupt
    >context. Does such code exist in the kernel? If not, how does one go
    >about implementing it from within a kernel module.

    Take a look at some driver implementations!
    There you will find some ways how to put a process into a sleep state.

    Grep for "*->state*TASK_UNINTERRUPTIBLE" and take also a look at the
    interaction with schedule() and spinlocks.

    >Thanks.
    >Kay Tiong

    Best regards

    --
    Hagen Pfeifer
    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2006-10-18 00:59    [W:0.049 / U:30.656 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site