ok, I found the bug in the timer implementation, a fix is coming soon.

On Mon, Feb 16, 2009 at 10:27 AM, David Turner <di...@android.com> wrote:

> this one's for me :-)
>
> Can you send me a small compilable test program to reproduce this (it'd be
> much better for me since
> I don't know what your timer_handler function is doing there).
>
> It might be a bug in the SIGEV_THREAD timer implementation, I checked and
> tested it for correctness but didn't look at CPU usage, I admit.
>
> By the way, sigev_signo isn't used with SIGEV_THREAD timers.
>
>
> On Mon, Feb 16, 2009 at 4:13 AM, henry.lon...@gmail.com <
> henry.lon...@gmail.com> wrote:
>
>>
>> hi,
>>
>> i played with timer_create routine with the following code. it seems
>> the timer is working, but the cpu utilization is really high(over 90%)
>> if i run "top". Any idea what's going on on G1?
>>
>> Thanks!
>>
>>
>> -----------------------------------------------------------------------------------------------------
>>        se.sigev_notify = SIGEV_THREAD;
>>        se.sigev_notify_function = timer_handler;
>>        se.sigev_signo = SIGUSR1;
>>        timer_create(CLOCK_REALTIME, &se, &tid);
>>
>>        memset(&ts, 0, sizeof(struct itimerspec));
>>        ts.it_value.tv_sec = 0;
>>        ts.it_value.tv_nsec = 30000000;
>>        ts.it_interval.tv_sec = 0;
>>        ts.it_interval.tv_nsec = 30000000;
>>        result = timer_settime(tid, 0, &ts, 0);
>>
>> >>
>>
>

--~--~---------~--~----~------------~-------~--~----~
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---

Reply via email to