|
Anklang-0.3.0.dev595+g65331842 anklang-0.3.0.dev595+g65331842
ASE — Anklang Sound Engine (C++)
« « « Anklang Documentation |
#include "platform.hh"#include "path.hh"#include "dbus.hh"#include "utils.hh"#include "strings.hh"#include "internal.hh"#include <unistd.h>#include <cstring>#include <fstream>#include <atomic>#include <setjmp.h>#include <libintl.h>#include <sys/stat.h>#include <sys/wait.h>#include <sys/time.h>#include <sys/resource.h>#include <sys/syscall.h>#include <semaphore.h>#include <stdarg.h>#include <sys/types.h>#include <pwd.h>#include <algorithm>#include "testing.hh"Go to the source code of this file.
Classes | |
| struct | Ase::CPUInfo |
| Acquire information about the runtime architecture and CPU type. More... | |
| struct | Ase::PwdUser |
Namespaces | |
| namespace | Ase |
| The Anklang C++ API namespace. | |
| namespace | Ase::AnsiColors |
| The AnsiColors namespace contains utility functions for colored terminal output. | |
Macros | |
| #define | LIBTOOL_OBJDIR |
| #define | PDEBUG(...) |
| #define | x86_has_cpuid() |
| #define | x86_cpuid(input, count, eax, ebx, ecx, edx) |
| #define | ACCOUNTING_MSECS |
Functions | |
| String | Ase::anklang_home_dir (const String &subdir) |
Get Anklang home dir, possibly adding subdir. | |
| std::string | Ase::anklang_runpath (RPath rpath, const String &segment) |
| Retrieve various resource paths at runtime. | |
| const char *() | Ase::_ (const char *string) |
| Translate message strings in the Anklang/ASE text domain. | |
| std::string() | Ase::_ (const std::string &string) |
| Translate message strings in the Anklang/ASE text domain. | |
| const char *() | Ase::_ (const char *string, const char *plural, int64_t n) |
| Translate message strings in the Anklang/ASE text domain, use @plural forms if != 1. | |
| std::string() | Ase::_ (const std::string &string, const std::string &plural, int64_t n) |
| Translate message strings in the Anklang/ASE text domain, use @plural forms if != 1. | |
| void | Ase::AnsiColors::configure (Colorize colorize) |
| Override the environment variable $ASE_COLOR (which may contain "always", "never" or "auto"). | |
| bool | Ase::AnsiColors::colorize_tty (int fd) |
| Check whether the tty fd should use colorization, checks ASE_COLOR if fd == -1. | |
| std::string | Ase::AnsiColors::color (Colors acolor, Colors c1, Colors c2, Colors c3, Colors c4, Colors c5, Colors c6) |
| Return ANSI code for the specified color if stdout & stderr should be colorized, see colorize_tty(). | |
| const char * | Ase::AnsiColors::color_code (Colors acolor) |
| Return ANSI code for the specified color. | |
| std::string | Ase::cpu_arch () |
| Retrieve string identifying the CPU architecture. | |
| String | Ase::cpu_info () |
| The returned string contains: number of online CPUs, a string describing the CPU architecture, the vendor and finally a number of flag words describing CPU features plus a trailing space. | |
| uint64 | Ase::timestamp_startup () |
| Provides the timestamp_realtime() value from program startup. | |
| uint64 | Ase::timestamp_realtime () |
| Return the current time as uint64 in µseconds. | |
| uint64 | Ase::timestamp_resolution () |
| Provide resolution of timestamp_benchmark() in nano-seconds. | |
| uint64 | Ase::timestamp_benchmark () |
| Returns benchmark timestamp in nano-seconds, clock starts around program startup. | |
| String | Ase::timestamp_format (uint64 stamp, uint maxlength) |
| Convert stamp into a string, adding µsecond fractions if space permits. | |
| uint64 | Ase::monotonic_counter () |
| A monotonically increasing counter, increments are atomic and visible in all threads. | |
| std::string | Ase::executable_path () |
| Retrieve the path to the currently running executable. | |
| std::string | Ase::executable_name () ASE_PURE |
| Retrieve the name part of executable_path(). | |
| const char * | Ase::ase_version () |
| Provide a string containing the package version. | |
| const char * | Ase::ase_build_id () |
| Provide a string containing the ASE library build id. | |
| String | Ase::program_alias () |
| Retrieve the program name as used for logging or debug messages. | |
| void | Ase::program_alias_init (String customname) |
| Set program_alias to a non-localized alias other than program_argv0 if desired. | |
| String | Ase::application_name () |
| Retrieve the localized program name intended for user display. | |
| void | Ase::application_name_init (String desktopname) |
| Set the application_name to a name other than program_alias if desired. | |
| String | Ase::program_cwd () |
| The current working directory during startup. | |
| int | Ase::sched_get_priority (int tid) |
Retrieve the nice level of process or thread tid. | |
| bool | Ase::sched_set_priority (int tid, int nicelevel) |
Try to set the nice level of process or thread tid to nicelevel. | |
| bool | Ase::sched_fast_priority (int tid) |
| Try to acquire low latency scheduling priority, returns true if nice level is < 0. | |
| ThreadId | Ase::this_thread_self () |
| void | Ase::this_thread_set_name (const String &name16chars) |
| String | Ase::this_thread_get_name () |
| int | Ase::this_thread_getpid () |
| int | Ase::this_thread_gettid () |
| int | Ase::this_thread_online_cpus () |
| int | Ase::user_id () |
| String | Ase::user_name () |
| String | Ase::user_real_name () |
| struct Ase::CPUInfo |
Acquire information about the runtime architecture and CPU type.
Definition at line 293 of file platform.cc.
| Class Members | ||
|---|---|---|
| char | cpu_vendor[13] | |
| const char * | machine | |
| uint | x86_3dnow: 1 | |
| uint | x86_3dnowext: 1 | |
| uint | x86_cx16: 1 | |
| uint | x86_fpu: 1 | |
| uint | x86_htt: 1 | |
| uint | x86_mmx: 1 | |
| uint | x86_mmxext: 1 | |
| uint | x86_rdrand: 1 | |
| uint | x86_sse: 1 | |
| uint | x86_sse2: 1 | |
| uint | x86_sse3: 1 | |
| uint | x86_sse4_1: 1 | |
| uint | x86_sse4_2: 1 | |
| uint | x86_ssesys: 1 | |
| uint | x86_ssse3: 1 | |
| uint | x86_tsc: 1 | |
| struct Ase::PwdUser |
Definition at line 1133 of file platform.cc.
| Class Members | ||
|---|---|---|
| String | real_name | |
| int | uid | |
| String | user_name | |
| #define ACCOUNTING_MSECS |
Definition at line 998 of file platform.cc.
| #define LIBTOOL_OBJDIR |
Definition at line 33 of file platform.cc.
| #define PDEBUG | ( | ... | ) |
Definition at line 36 of file platform.cc.
| #define x86_cpuid | ( | input, | |
| count, | |||
| eax, | |||
| ebx, | |||
| ecx, | |||
| edx | |||
| ) |
Definition at line 366 of file platform.cc.
| #define x86_has_cpuid | ( | ) |
Definition at line 365 of file platform.cc.