LCOV - code coverage report
Current view: top level - home/alexey/klever/native-scheduler-work-dir/native-scheduler-work-dir/scheduler/tasks/132 - thread.c (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 1 100.0 %
Date: 2017-01-25 Functions: 0 0 -

          Line data    Source code
       1             : /*
       2             :  * Copyright (c) 2014-2016 ISPRAS (http://www.ispras.ru)
       3             :  * Institute for System Programming of the Russian Academy of Sciences
       4             :  *
       5             :  * Licensed under the Apache License, Version 2.0 (the "License");
       6             :  * you may not use this file except in compliance with the License.
       7             :  * You may obtain a copy of the License at
       8           1 :  *
       9             :  *   http://www.apache.org/licenses/LICENSE-2.0
      10             :  *
      11             :  * Unless required by applicable law or agreed to in writing, software
      12             :  * distributed under the License is distributed on an "AS IS" BASIS,
      13             :  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      14             :  * ee the License for the specific language governing permissions and
      15             :  * limitations under the License.
      16             :  */
      17             : 
      18             : #include <verifier/thread.h>
      19             : 
      20             : /* Thread type */
      21             : struct ldv_thread {
      22             :     int identifier;
      23             :     void (*function)(void *);
      24             : };
      25             : 
      26             : /* Create thread */
      27             : int ldv_thread_create(struct ldv_thread *ldv_thread, void (*function)(void *), void *data)
      28             : {
      29             :     if (function)
      30             :         (*function)(data);
      31             :     return 0;
      32             : }
      33             : 
      34             : /* Create n threads */
      35             : int ldv_thread_create_N(struct ldv_thread_set *ldv_thread_set, void (*function)(void *), void *data)
      36             : {
      37             :     int i;
      38             : 
      39             :     if (function) {
      40             :         for (i = 0; i < ldv_thread_set->number; i++) {
      41             :            (*function)(data);
      42             :         }
      43             :     }
      44             :     return 0;
      45             : }
      46             : 
      47             : /* Join thread */
      48             : int ldv_thread_join(struct ldv_thread *ldv_thread, void (*function)(void *))
      49             : {
      50             :     return 0;
      51             : }
      52             : 
      53             : /* Join n threads */
      54             : int ldv_thread_join_N(struct ldv_thread_set *ldv_thread_set, void (*function)(void *))
      55             : {
      56             :     return 0;
      57             : }

Generated by: LCOV version 1.10