Lines Matching full:chre
29 #include "chre/core/event_loop.h"
30 #include "chre/core/event_loop_manager.h"
31 #include "chre/core/init.h"
32 #include "chre/core/static_nanoapps.h"
33 #include "chre/platform/fatal_error.h"
34 #include "chre/platform/log.h"
35 #include "chre/platform/memory.h"
36 #include "chre/platform/mutex.h"
37 #include "chre/platform/slpi/fastrpc.h"
38 #include "chre/platform/slpi/preloaded_nanoapps.h"
39 #include "chre/platform/slpi/uimg_util.h"
40 #include "chre/util/lock_guard.h"
43 #include "chre/platform/slpi/see/island_vote_client.h"
46 using chre::EventLoop;
47 using chre::EventLoopManagerSingleton;
48 using chre::LockGuard;
49 using chre::Mutex;
50 using chre::UniquePtr;
54 // Qualcomm-defined function needed to indicate that the CHRE thread may call
62 //! Size of the stack for the CHRE thread, in bytes.
68 constexpr unsigned char kTcbPartition = chre::isSlpiUimgSupported() ?
71 //! The priority to set for the CHRE thread (value between 1-255, with 1 being
76 //! How long we wait (in microseconds) between checks on whether the CHRE thread
80 //! Buffer to use for the CHRE thread's stack.
83 //! QuRT OS handle for the CHRE thread.
87 //! sections (starting/stopping the CHRE thread).
90 //! Set to true when the CHRE thread starts, and false when it exits normally.
100 UniquePtr<char> dump = chre::EventLoopManagerSingleton::get()->debugDump();
108 chre::EventLoopManagerSingleton::get()->deferCallback(
109 chre::SystemCallbackType::PerformDebugDump, &debugDumpHandle,
114 * Entry point for the QuRT thread that runs CHRE.
120 chre::loadStaticNanoapps();
121 chre::loadPreloadedNanoapps();
122 ashRegisterDebugDumpCallback("CHRE", onDebugDumpRequested, nullptr);
126 chre::deinit();
128 chre::IslandVoteClientSingleton::deinit();
131 LOGD("CHRE thread exiting");
135 LOGW("Host process died, exiting CHRE (running %d)", gThreadRunning);
141 namespace chre {
147 } // namespace chre
150 * Invoked over FastRPC to initialize and start the CHRE thread.
160 LOGE("CHRE thread already running");
163 chre::IslandVoteClientSingleton::init("CHRE" /* clientName */);
168 chre::init();
170 // Human-readable name for the CHRE thread (not const in QuRT API, but they
172 char threadName[] = "CHRE";
183 LOGI("Starting CHRE thread");
187 LOGE("Couldn't create CHRE thread: %d", result);
192 LOGD("Started CHRE thread");
201 * Blocks until the CHRE thread exits. Called over FastRPC to monitor for
202 * abnormal termination of the CHRE thread and/or SLPI as a whole.
208 LOGE("Tried monitoring for CHRE thread exit, but thread not running!");
215 LOGI("Detected CHRE thread exit");
222 * If the CHRE thread is running, requests it to perform graceful shutdown,
233 LOGD("Tried to stop CHRE thread, but not running");
239 // Note: LOGE is not necessarily safe to use after stopping CHRE
261 chre::HostLinkBase::shutdown();
271 * reason, so we can stop the CHRE thread.