blob: bda58de407b8d01e49a94dca06f99adb30c007a3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#include "what_thread_does.h"
#include "thread_extra.h"
#include <util/system/tls.h>
Y_POD_STATIC_THREAD(const char*)
WhatThreadDoes;
const char* PushWhatThreadDoes(const char* what) {
const char* r = NTSAN::RelaxedLoad(&WhatThreadDoes);
NTSAN::RelaxedStore(&WhatThreadDoes, what);
return r;
}
void PopWhatThreadDoes(const char* prev) {
NTSAN::RelaxedStore(&WhatThreadDoes, prev);
}
const char** WhatThreadDoesLocation() {
return &WhatThreadDoes;
}
|