SIONlib  1.7.7
Scalable I/O library for parallel access to task-local files
Macros | Functions
sion_flags.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include "sion.h"
#include "sion_flags.h"
#include "sion_internal.h"
Include dependency graph for sion_flags.c:

Go to the source code of this file.

Macros

#define _XOPEN_SOURCE   700
 
#define DFUNCTION   "_sion_flags_init_entry"
 
#define DFUNCTION   "_sion_flags_create_entry"
 
#define DFUNCTION   "_sion_flags_destroy_entry"
 
#define DFUNCTION   "_sion_flags_iter"
 
#define DFUNCTION   "_sion_flags_init_store"
 
#define DFUNCTION   "_sion_flags_create_store"
 
#define DFUNCTION   "_sion_flags_destroy_store"
 
#define DFUNCTION   "_sion_flags_add_entry"
 
#define DFUNCTION   "_sion_flags_add"
 
#define DFUNCTION   "_sion_flags_get"
 
#define DFUNCTION   "_sion_flags_update_mask"
 
#define DFUNCTION   "_sion_parse_flags"
 

Functions

void _sion_flags_init_entry (_sion_flags_entry *entry)
 
_sion_flags_entry_sion_flags_create_entry (void)
 Create a flags entry. More...
 
void _sion_flags_destroy_entry (_sion_flags_entry **entry)
 
_sion_flags_entry_sion_flags_iter (_sion_flags_store *store)
 
void _sion_flags_init_store (_sion_flags_store *store)
 
_sion_flags_store_sion_flags_create_store (void)
 Create a flags entry. More...
 
void _sion_flags_destroy_store (_sion_flags_store **store)
 
_sion_flags_entry_sion_flags_add_entry (_sion_flags_entry *entry, const char *key, const char *val)
 Create a flags entry. More...
 
void _sion_flags_add (_sion_flags_store *store, const char *key, const char *val)
 
_sion_flags_entry_sion_flags_get (_sion_flags_store *store, const char *key)
 
sion_int64 _sion_flags_update_mask (_sion_flags_store *store)
 
_sion_flags_store_sion_parse_flags (const char *flags)
 Parse flags and return a flags store with key value pairs. More...
 

Detailed Description

Flags handling

Definition in file sion_flags.c.

Function Documentation

◆ _sion_flags_add_entry()

_sion_flags_entry* _sion_flags_add_entry ( _sion_flags_entry entry,
const char *  key,
const char *  val 
)

Create a flags entry.

Memory is deallocated in _sion_flags_destroy_entry.

Parameters
[in,out]entrycurrent flag entry to add key and value to
[in]keykey
[in]valvalue
Returns
flag store with key value pairs

Definition at line 156 of file sion_flags.c.

◆ _sion_flags_create_entry()

_sion_flags_entry* _sion_flags_create_entry ( void  )

Create a flags entry.

Use _sion_flags_destroy_entry to free the memory when not needed any longer.

Returns
flag entry

Definition at line 49 of file sion_flags.c.

◆ _sion_flags_create_store()

_sion_flags_store* _sion_flags_create_store ( void  )

Create a flags entry.

Use _sion_flags_destroy_store to free the memory when not needed any longer.

Returns
flag store with flag entries (key value pairs)

Definition at line 107 of file sion_flags.c.

◆ _sion_parse_flags()

_sion_flags_store* _sion_parse_flags ( const char *  flags)

Parse flags and return a flags store with key value pairs.

Parameters
[in]flagsstring containing the open flags
Returns
flag store with key value pairs

Definition at line 326 of file sion_flags.c.