root/maint/gnulib/tests/test-threads-c++.cc

/* [previous][next][first][last][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. main

   1 /* Test of <threads.h> substitute in C++ mode.
   2    Copyright (C) 2019-2021 Free Software Foundation, Inc.
   3 
   4    This program is free software: you can redistribute it and/or modify
   5    it under the terms of the GNU General Public License as published by
   6    the Free Software Foundation; either version 3 of the License, or
   7    (at your option) any later version.
   8 
   9    This program is distributed in the hope that it will be useful,
  10    but WITHOUT ANY WARRANTY; without even the implied warranty of
  11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  12    GNU General Public License for more details.
  13 
  14    You should have received a copy of the GNU General Public License
  15    along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
  16 
  17 /* Written by Bruno Haible <bruno@clisp.org>, 2019.  */
  18 
  19 #define GNULIB_NAMESPACE gnulib
  20 #include <config.h>
  21 
  22 #include <threads.h>
  23 
  24 #include "signature.h"
  25 
  26 
  27 #if GNULIB_TEST_THRD
  28 SIGNATURE_CHECK (GNULIB_NAMESPACE::thrd_create, int,
  29                  (thrd_t *, thrd_start_t, void *));
  30 SIGNATURE_CHECK (GNULIB_NAMESPACE::thrd_current, thrd_t, (void));
  31 SIGNATURE_CHECK (GNULIB_NAMESPACE::thrd_equal, int, (thrd_t, thrd_t));
  32 SIGNATURE_CHECK (GNULIB_NAMESPACE::thrd_sleep, int,
  33                  (const struct timespec *, struct timespec *));
  34 SIGNATURE_CHECK (GNULIB_NAMESPACE::thrd_yield, void, (void));
  35 SIGNATURE_CHECK (GNULIB_NAMESPACE::thrd_detach, int, (thrd_t));
  36 SIGNATURE_CHECK (GNULIB_NAMESPACE::thrd_join, int, (thrd_t, int *));
  37 SIGNATURE_CHECK (GNULIB_NAMESPACE::thrd_exit, void, (int));
  38 #endif
  39 
  40 #if GNULIB_TEST_MTX
  41 SIGNATURE_CHECK (GNULIB_NAMESPACE::mtx_init, int, (mtx_t *, int));
  42 SIGNATURE_CHECK (GNULIB_NAMESPACE::mtx_lock, int, (mtx_t *));
  43 SIGNATURE_CHECK (GNULIB_NAMESPACE::mtx_trylock, int, (mtx_t *));
  44 SIGNATURE_CHECK (GNULIB_NAMESPACE::mtx_timedlock, int,
  45                  (mtx_t *, const struct timespec *));
  46 SIGNATURE_CHECK (GNULIB_NAMESPACE::mtx_unlock, int, (mtx_t *));
  47 SIGNATURE_CHECK (GNULIB_NAMESPACE::mtx_destroy, void, (mtx_t *));
  48 SIGNATURE_CHECK (GNULIB_NAMESPACE::call_once, void,
  49                  (once_flag *, void (*) (void)));
  50 #endif
  51 
  52 #if GNULIB_TEST_CND
  53 SIGNATURE_CHECK (GNULIB_NAMESPACE::cnd_init, int, (cnd_t *));
  54 SIGNATURE_CHECK (GNULIB_NAMESPACE::cnd_wait, int, (cnd_t *, mtx_t *));
  55 SIGNATURE_CHECK (GNULIB_NAMESPACE::cnd_timedwait, int,
  56                  (cnd_t *, mtx_t *, const struct timespec *));
  57 SIGNATURE_CHECK (GNULIB_NAMESPACE::cnd_signal, int, (cnd_t *));
  58 SIGNATURE_CHECK (GNULIB_NAMESPACE::cnd_broadcast, int, (cnd_t *));
  59 SIGNATURE_CHECK (GNULIB_NAMESPACE::cnd_destroy, void, (cnd_t *));
  60 #endif
  61 
  62 #if GNULIB_TEST_TSS
  63 SIGNATURE_CHECK (GNULIB_NAMESPACE::tss_create, int, (tss_t *, tss_dtor_t));
  64 SIGNATURE_CHECK (GNULIB_NAMESPACE::tss_set, int, (tss_t, void *));
  65 SIGNATURE_CHECK (GNULIB_NAMESPACE::tss_get, void *, (tss_t));
  66 SIGNATURE_CHECK (GNULIB_NAMESPACE::tss_delete, void, (tss_t));
  67 #endif
  68 
  69 
  70 int
  71 main ()
     /* [previous][next][first][last][top][bottom][index][help] */
  72 {
  73 }

/* [previous][next][first][last][top][bottom][index][help] */