source: libcfa/src/concurrency/clib/cfathread.h @ bb662027

arm-ehjacob/cs343-translationnew-ast-unique-expr
Last change on this file since bb662027 was bb662027, checked in by Thierry Delisle <tdelisle@…>, 16 months ago

Added cfathread C library which encapsulates a small part of libcfa threads in a C interface.

  • Property mode set to 100644
File size: 997 bytes
Line 
1//
2// Cforall Version 1.0.0 Copyright (C) 2016 University of Waterloo
3//
4// The contents of this file are covered under the licence agreement in the
5// file "LICENCE" distributed with Cforall.
6//
7// clib/cfathread.h --
8//
9// Author           : Thierry Delisle
10// Created On       : Tue Sep 22 15:31:20 2020
11// Last Modified By :
12// Last Modified On :
13// Update Count     :
14//
15
16#include "stddef.h"
17#include "invoke.h"
18
19#if defined(__cforall) || defined(__cpluplus)
20extern "C" {
21#endif
22        //--------------------
23        // Basic types
24        struct cfathread_CRunner_t;
25        typedef struct cfathread_CRunner_t * cfathread_t;
26
27        //--------------------
28        // Basic thread support
29        cfathread_t cfathread_create( void (*main)( cfathread_t ) );
30        void cfathread_join( cfathread_t );
31
32        void cfathread_park( void );
33        void cfathread_unpark( cfathread_t );
34        void cfathread_yield( void );
35
36        //--------------------
37        // Basic kernel features
38        void cfathread_setproccnt( int );
39
40
41#if defined(__cforall) || defined(__cpluplus)
42}
43#endif
Note: See TracBrowser for help on using the repository browser.