⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 130619 in webkit


Ignore:
Timestamp:
Oct 8, 2012, 12:20:17 AM (14 years ago)
Author:
commit-queue@webkit.org
Message:

[EFL] Use ecore_main_loop_thread_safe_call_async() to wakeup main loop.
​https://bugs.webkit.org/show_bug.cgi?id=98505

Patch by Byungwoo Lee <​bw80.lee@samsung.com> on 2012-10-08
Reviewed by Kenneth Rohde Christiansen.

Instead of ecore_pipe_write(),
use ecore_main_loop_thread_safe_call_async() to wakeup ecore main loop.

According to the EFL API document, this function is designed to dispatch
a function on ecore main loop by avoiding dead lock or race condition.
With this function, webkit doesn't need to maintain ecore pipe also.

Source/WebCore:

No new tests. The function to wakeup main loop is changed.

  • platform/RunLoop.h:

(RunLoop):

  • platform/efl/RunLoopEfl.cpp:

(WebCore::RunLoop::RunLoop):
(WebCore::RunLoop::wakeUpEvent):
(WebCore::RunLoop::wakeUp):

Source/WTF:

  • wtf/efl/MainThreadEfl.cpp:

(WTF::monitorDispatchFunctions):
(WTF::initializeMainThreadPlatform):
(WTF::scheduleDispatchFunctionsOnMainThread):

Location:
trunk/Source
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WTF/ChangeLog

    r130612 r130619  
     12012-10-08  Byungwoo Lee  <bw80.lee@samsung.com>
     2
     3        [EFL] Use ecore_main_loop_thread_safe_call_async() to wakeup main loop.
     4        https://bugs.webkit.org/show_bug.cgi?id=98505
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        Instead of ecore_pipe_write(),
     9        use ecore_main_loop_thread_safe_call_async() to wakeup ecore main loop.
     10
     11        According to the EFL API document, this function is designed to dispatch
     12        a function on ecore main loop by avoiding dead lock or race condition.
     13        With this function, webkit doesn't need to maintain ecore pipe also.
     14
     15        * wtf/efl/MainThreadEfl.cpp:
     16        (WTF::monitorDispatchFunctions):
     17        (WTF::initializeMainThreadPlatform):
     18        (WTF::scheduleDispatchFunctionsOnMainThread):
     19
    1202012-10-07  Caio Marcelo de Oliveira Filho  <caio.oliveira@openbossa.org>
    221
  • trunk/Source/WTF/wtf/efl/MainThreadEfl.cpp

    r111778 r130619  
    4242namespace WTF {
    4343
    44 static OwnPtr<Ecore_Pipe>& pipeObject()
    45 {
    46     DEFINE_STATIC_LOCAL(OwnPtr<Ecore_Pipe>, pipeObject, ());
    47     return pipeObject;
    48 }
    49 
    50 static void monitorDispatchFunctions(void*, void*, unsigned int)
     44static void monitorDispatchFunctions(void*)
    5145{
    5246    dispatchFunctionsFromMainThread();
    … …  
    5549void initializeMainThreadPlatform()
    5650{
    57     pipeObject() = adoptPtr(ecore_pipe_add(monitorDispatchFunctions, 0));
    5851}
    5952
    6053void scheduleDispatchFunctionsOnMainThread()
    6154{
    62     ecore_pipe_write(pipeObject().get(), "", 0);
     55    ecore_main_loop_thread_safe_call_async(monitorDispatchFunctions, 0);
    6356}
    6457
  • trunk/Source/WebCore/ChangeLog

    r130616 r130619  
     12012-10-08  Byungwoo Lee  <bw80.lee@samsung.com>
     2
     3        [EFL] Use ecore_main_loop_thread_safe_call_async() to wakeup main loop.
     4        https://bugs.webkit.org/show_bug.cgi?id=98505
     5
     6        Reviewed by Kenneth Rohde Christiansen.
     7
     8        Instead of ecore_pipe_write(),
     9        use ecore_main_loop_thread_safe_call_async() to wakeup ecore main loop.
     10
     11        According to the EFL API document, this function is designed to dispatch
     12        a function on ecore main loop by avoiding dead lock or race condition.
     13        With this function, webkit doesn't need to maintain ecore pipe also.
     14
     15        No new tests. The function to wakeup main loop is changed.
     16
     17        * platform/RunLoop.h:
     18        (RunLoop):
     19        * platform/efl/RunLoopEfl.cpp:
     20        (WebCore::RunLoop::RunLoop):
     21        (WebCore::RunLoop::wakeUpEvent):
     22        (WebCore::RunLoop::wakeUp):
     23
    1242012-10-07  Arpita Bahuguna  <arpitabahuguna@gmail.com>
    225
  • trunk/Source/WebCore/platform/RunLoop.h

    r123716 r130619  
    168168#elif PLATFORM(EFL)
    169169    bool m_initEfl;
    170     OwnPtr<Ecore_Pipe> m_pipe;
    171     static void wakeUpEvent(void* data, void*, unsigned int);
     170    static void wakeUpEvent(void* data);
    172171#endif
    173172};
  • trunk/Source/WebCore/platform/efl/RunLoopEfl.cpp

    r129872 r130619  
    3535#include <wtf/PassOwnPtr.h>
    3636
    37 static const int ecorePipeMessageSize = 1;
    38 static const char wakupEcorePipeMessage[] = "W";
    39 
    4037namespace WebCore {
    4138
    … …  
    6360    }
    6461
    65     m_pipe = adoptPtr(ecore_pipe_add(wakeUpEvent, this));
    6662    m_initEfl = true;
    6763
    … …  
    9692}
    9793
    98 void RunLoop::wakeUpEvent(void* data, void*, unsigned int)
     94void RunLoop::wakeUpEvent(void* data)
    9995{
    10096    static_cast<RunLoop*>(data)->performWork();
    … …  
    10399void RunLoop::wakeUp()
    104100{
    105     ecore_pipe_write(m_pipe.get(), wakupEcorePipeMessage, ecorePipeMessageSize);
     101    ecore_main_loop_thread_safe_call_async(wakeUpEvent, this);
    106102}
    107103
Note: See TracChangeset for help on using the changeset viewer.