Ion
|
#include "ion/port/threadutils.h"
#include <cstring>
#include <iostream>
#include <sched.h>
#include <stdio.h>
Go to the source code of this file.
Namespaces | |
ion | |
Copyright 2016 Google Inc. | |
ion::port | |
Macros | |
#define | API_DECL |
Copyright 2016 Google Inc. More... | |
#define | THREAD_NAMING_SUPPORTED 1 |
Functions | |
ThreadId | ion::port::SpawnThread (const ThreadFuncPtr func_ptr) |
Platform-independent public functions. More... | |
ThreadId | ion::port::SpawnThreadStd (const ThreadStdFunc *func) |
bool | ion::port::IsThreadNamingSupported () |
Thread naming functions. More... | |
bool | ion::port::IsMainThread () |
Returns true if the current thread is the main thread. More... | |
void | ion::port::SetMainThreadId (ThreadId id) |
Sets the given thread ID to be considered the main thread; IsMainThread() will return true only for this thread. More... | |
bool | ion::port::JoinThread (ThreadId id) |
Windows-specific public functions. More... | |
size_t | ion::port::GetMaxThreadNameLength () |
Returns the maximum length of a thread name if restricted by the platform. More... | |
bool | ion::port::SetThreadName (const std::string &name) |
Sets the name of the current thread. More... | |
void | ion::port::YieldThread () |
Causes the calling thread to relinquish the CPU if there are other threads waiting to execute. More... | |
ThreadId | ion::port::GetCurrentThreadId () |
Thread ID functions. More... | |
ThreadLocalStorageKey | ion::port::CreateThreadLocalStorageKey () |
Thread-local storage functions. More... | |
bool | ion::port::SetThreadLocalStorage (ThreadLocalStorageKey key, void *ptr) |
Associates ptr with the thread-local storage area indicated by key. More... | |
void * | ion::port::GetThreadLocalStorage (ThreadLocalStorageKey key) |
Returns the pointer to the thread-local storage area indicated by key. More... | |
bool | ion::port::DeleteThreadLocalStorageKey (ThreadLocalStorageKey key) |
Deletes a key returned by CreateThreadLocalStorageKey(). More... | |
#define API_DECL |
Copyright 2016 Google Inc.
All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Definition at line 28 of file threadutils.cc.
#define THREAD_NAMING_SUPPORTED 1 |
Definition at line 34 of file threadutils.cc.
Referenced by ion::port::IsThreadNamingSupported().