reactor-c
C Runtime for Lingua Franca
Loading...
Searching...
No Matches
platform.c File Reference

A variant of the platform abstraction whose ABI is platform-independent. More...

#include <stdlib.h>
#include "low_level_platform.h"
#include "platform.h"

Functions

lf_platform_mutex_ptr_t lf_platform_mutex_new ()
 Create a new mutex and return (a pointer to) it.
 
void lf_platform_mutex_free (lf_platform_mutex_ptr_t mutex)
 Free all resources associated with the provided mutex.
 
int lf_platform_mutex_lock (lf_platform_mutex_ptr_t mutex)
 Acquire the given mutex.
 
int lf_platform_mutex_unlock (lf_platform_mutex_ptr_t mutex)
 Release the given mutex.
 

Detailed Description

A variant of the platform abstraction whose ABI is platform-independent.

Author
Peter Donovan (peter.nosp@m.@xro.nosp@m.nos.c.nosp@m.om)
Version
0.1
Date
2024-01-29

Function Documentation

◆ lf_platform_mutex_free()

void lf_platform_mutex_free ( lf_platform_mutex_ptr_t mutex)

Free all resources associated with the provided mutex.

◆ lf_platform_mutex_lock()

int lf_platform_mutex_lock ( lf_platform_mutex_ptr_t mutex)

Acquire the given mutex.

Returns
0 on success, platform-specific error number otherwise.

◆ lf_platform_mutex_new()

lf_platform_mutex_ptr_t lf_platform_mutex_new ( )

Create a new mutex and return (a pointer to) it.

◆ lf_platform_mutex_unlock()

int lf_platform_mutex_unlock ( lf_platform_mutex_ptr_t mutex)

Release the given mutex.

Returns
0 on success, platform-specific error number otherwise.