You've already forked Zygisk-Assistant
mirror of
https://github.com/snake-4/Zygisk-Assistant.git
synced 2025-09-06 06:37:02 +00:00
Initial commit
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// UNSUPPORTED: no-threads
|
||||
|
||||
// <thread>
|
||||
|
||||
// thread::id this_thread::get_id();
|
||||
|
||||
#include <thread>
|
||||
#include <cassert>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
std::thread::id id = std::this_thread::get_id();
|
||||
assert(id != std::thread::id());
|
||||
|
||||
return 0;
|
||||
}
|
||||
+22
@@ -0,0 +1,22 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// <thread>
|
||||
|
||||
// template <class Rep, class Period>
|
||||
// void sleep_for(const chrono::duration<Rep, Period>& rel_time);
|
||||
|
||||
// The std::this_thread::sleep_for test requires POSIX specific headers and
|
||||
// is therefore non-standard. For this reason the test lives under the 'libcxx'
|
||||
// subdirectory.
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
|
||||
return 0;
|
||||
}
|
||||
+35
@@ -0,0 +1,35 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// UNSUPPORTED: no-threads
|
||||
|
||||
// <thread>
|
||||
|
||||
// template <class Clock, class Duration>
|
||||
// void sleep_until(const chrono::time_point<Clock, Duration>& abs_time);
|
||||
|
||||
#include <thread>
|
||||
#include <cstdlib>
|
||||
#include <cassert>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
typedef std::chrono::system_clock Clock;
|
||||
typedef Clock::time_point time_point;
|
||||
std::chrono::milliseconds ms(500);
|
||||
time_point t0 = Clock::now();
|
||||
std::this_thread::sleep_until(t0 + ms);
|
||||
time_point t1 = Clock::now();
|
||||
// NOTE: Operating systems are (by default) best effort and therefore we may
|
||||
// have slept longer, perhaps much longer than we requested.
|
||||
assert(t1 - t0 >= ms);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||||
// See https://llvm.org/LICENSE.txt for license information.
|
||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// UNSUPPORTED: no-threads
|
||||
|
||||
// <thread>
|
||||
|
||||
// void this_thread::yield();
|
||||
|
||||
#include <thread>
|
||||
#include <cassert>
|
||||
|
||||
#include "test_macros.h"
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
std::this_thread::yield();
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user