Merge "Change _stdio_handles_locking into _caller_handles_locking."
This commit is contained in:
@@ -30,12 +30,8 @@
|
||||
#include <unwind.h>
|
||||
|
||||
#include <atomic>
|
||||
#include <regex>
|
||||
#include <vector>
|
||||
|
||||
#include <base/file.h>
|
||||
#include <base/stringprintf.h>
|
||||
|
||||
#include "private/bionic_constants.h"
|
||||
#include "private/bionic_macros.h"
|
||||
#include "private/ScopeGuard.h"
|
||||
@@ -44,8 +40,6 @@
|
||||
|
||||
#include "utils.h"
|
||||
|
||||
extern "C" pid_t gettid();
|
||||
|
||||
TEST(pthread, pthread_key_create) {
|
||||
pthread_key_t key;
|
||||
ASSERT_EQ(0, pthread_key_create(&key, NULL));
|
||||
@@ -722,23 +716,6 @@ TEST(pthread, pthread_rwlock_smoke) {
|
||||
ASSERT_EQ(0, pthread_rwlock_destroy(&l));
|
||||
}
|
||||
|
||||
static void WaitUntilThreadSleep(std::atomic<pid_t>& tid) {
|
||||
while (tid == 0) {
|
||||
usleep(1000);
|
||||
}
|
||||
std::string filename = android::base::StringPrintf("/proc/%d/stat", tid.load());
|
||||
std::regex regex {R"(\s+S\s+)"};
|
||||
|
||||
while (true) {
|
||||
std::string content;
|
||||
ASSERT_TRUE(android::base::ReadFileToString(filename, &content));
|
||||
if (std::regex_search(content, regex)) {
|
||||
break;
|
||||
}
|
||||
usleep(1000);
|
||||
}
|
||||
}
|
||||
|
||||
struct RwlockWakeupHelperArg {
|
||||
pthread_rwlock_t lock;
|
||||
enum Progress {
|
||||
|
||||
Reference in New Issue
Block a user