1/*
2 * Copyright (C) 2017 The Android Open Source Project
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
17package android.hardware.tests.multithread@1.0;
18
19/**
20 * IMultithread tests configureRpcThreadpool
21 *
22 * Makes calls finish only when specific number of them are running in parallel
23 */
24interface IMultithread {
25    /**
26     * Sets up controller
27     * Must be called for each test
28     * @param maxThreads arg passed to configureRpcThreadpool
29     * Could not be decremented by future calls
30     * @param numThreads number of calls in parallel to finish
31     */
32    setNumThreads(int32_t maxThreads, int32_t numThreads);
33
34    /**
35     * Makes a new call
36     * @return noTimeout numThreads appeared in parallel before timeout
37     * Shall return the same value for one setNumThreads call
38     */
39    runNewThread() generates (bool noTimeout);
40};
41