Subversion Repositories Kolibri OS

Rev

Rev 4125 | Rev 6336 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4125 Rev 4292
Line 102... Line 102...
102
bool schedule_delayed_work(struct delayed_work *dwork, unsigned long delay)
102
bool schedule_delayed_work(struct delayed_work *dwork, unsigned long delay)
103
{
103
{
104
    return queue_delayed_work(system_wq, dwork, delay);
104
    return queue_delayed_work(system_wq, dwork, delay);
105
}
105
}
Line -... Line 106...
-
 
106
 
-
 
107
bool mod_delayed_work(struct workqueue_struct *wq,
-
 
108
                                    struct delayed_work *dwork,
-
 
109
                                    unsigned long delay)
-
 
110
{
-
 
111
    return queue_delayed_work(wq, dwork, delay);
-
 
112
}
-
 
113
 
-
 
114
int del_timer(struct timer_list *timer)
-
 
115
{
-
 
116
    int ret = 0;
-
 
117
 
-
 
118
    if(timer->handle)
-
 
119
    {
-
 
120
        CancelTimerHS(timer->handle);
-
 
121
        timer->handle = 0;
-
 
122
        ret = 1;
-
 
123
    };
-
 
124
    return ret;
-
 
125
};
-
 
126
 
-
 
127
bool cancel_work_sync(struct work_struct *work)
-
 
128
{
-
 
129
    unsigned long flags;
-
 
130
    int ret = 0;
-
 
131
 
-
 
132
    spin_lock_irqsave(&system_wq->lock, flags);
-
 
133
    if(!list_empty(&work->entry))
-
 
134
    {
-
 
135
        list_del(&work->entry);
-
 
136
        ret = 1;
-
 
137
    };
-
 
138
    spin_unlock_irqrestore(&system_wq->lock, flags);
-
 
139
    return ret;
-
 
140
}
-
 
141
 
-
 
142
bool cancel_delayed_work(struct delayed_work *dwork)
-
 
143
{
-
 
144
    return cancel_work_sync(&dwork->work);
-
 
145
}
-
 
146
 
-
 
147
bool cancel_delayed_work_sync(struct delayed_work *dwork)
-
 
148
{
-
 
149
    return cancel_work_sync(&dwork->work);
-
 
150
}
106
 
151
 
107
int mod_timer(struct timer_list *timer, unsigned long expires)
152
int mod_timer(struct timer_list *timer, unsigned long expires)
108
{
153
{
109
    int ret = 0;
154
    int ret = 0;