File tree Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Expand file tree Collapse file tree 3 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -156,7 +156,7 @@ jobs:
156
156
matrix :
157
157
mode : [ Release, Debug ]
158
158
159
- runs-on : ubuntu-20 .04
159
+ runs-on : ubuntu-22 .04
160
160
161
161
steps :
162
162
- name : Checkout
@@ -165,8 +165,8 @@ jobs:
165
165
- name : Install ninja-build tool
166
166
uses : seanmiddleditch/gha-setup-ninja@master
167
167
168
- - name : Install clang-7
169
- run : sudo apt-get install clang-7 clang++-7
168
+ - name : Install clang-11
169
+ run : sudo apt-get install clang-11 clang++-11
170
170
171
171
- name : ccache
172
172
uses : hendrikmuhs/ccache-action@v1.2
@@ -175,7 +175,7 @@ jobs:
175
175
176
176
- name : Configure
177
177
run : |
178
- CXX=clang++-7 CC=clang-7
178
+ CXX=clang++-11 CC=clang-11
179
179
cmake -B ${{github.workspace}}/build -G Ninja \
180
180
-DCMAKE_BUILD_TYPE=${{matrix.mode}} \
181
181
-DUSE_CCACHE=${{env.ccache}} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
@@ -185,4 +185,4 @@ jobs:
185
185
186
186
- name : Test
187
187
working-directory : ${{github.workspace}}/build
188
- run : ctest -C ${{matrix.mode}} -j 1 -V
188
+ run : ctest -C ${{matrix.mode}} -j 1 -V
Original file line number Diff line number Diff line change @@ -126,7 +126,7 @@ jobs:
126
126
strategy :
127
127
matrix :
128
128
mode : [ Release, Debug ]
129
- runs-on : ubuntu-20 .04
129
+ runs-on : ubuntu-22 .04
130
130
131
131
steps :
132
132
- name : Checkout
Original file line number Diff line number Diff line change @@ -190,8 +190,14 @@ class io_context_pool {
190
190
cpu_set_t cpuset;
191
191
CPU_ZERO (&cpuset);
192
192
CPU_SET (i, &cpuset);
193
+
194
+ #ifdef __ANDROID__
195
+ const pid_t tid = pthread_gettid_np (threads.back ()->native_handle ());
196
+ int rc = sched_setaffinity (tid, sizeof (cpu_set_t ), &cpuset);
197
+ #else
193
198
int rc = pthread_setaffinity_np (threads.back ()->native_handle (),
194
199
sizeof (cpu_set_t ), &cpuset);
200
+ #endif
195
201
if (rc != 0 ) {
196
202
std::cerr << " Error calling pthread_setaffinity_np: " << rc << " \n " ;
197
203
}
You can’t perform that action at this time.
0 commit comments