proxygen
Sched.h
Go to the documentation of this file.
1 /*
2  * Copyright 2017-present Facebook, Inc.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #pragma once
18 
19 #ifndef _WIN32
20 #include <sched.h>
21 #else
22 #define SCHED_OTHER 0
23 #define SCHED_FIFO 1
24 #define SCHED_RR 2
25 
26 namespace folly {
27 namespace portability {
28 namespace sched {
29 struct sched_param {
30  int sched_priority;
31 };
32 int sched_yield();
33 int sched_get_priority_min(int policy);
34 int sched_get_priority_max(int policy);
35 } // namespace sched
36 } // namespace portability
37 } // namespace folly
38 
39 /* using override */ using namespace folly::portability::sched;
40 #endif
—— Concurrent Priority Queue Implementation ——
Definition: AtomicBitSet.h:29