#include <hipc.h>

Go to the source code of this file.
Data Structures | |
| struct | HIPC_pbank | 
Enumerations | |
| enum | HIPC_pbank_stat { HIPC_PBANK_STAT_GROUND, HIPC_PBANK_STAT_REQUESTED, HIPC_PBANK_STAT_ACCEPTED } | 
Functions | |
| void | hipcPbankInit (struct HIPC_pbank *const bank_p, void *const buf_p, const size_t page_size) | 
| Initializes a parameter bank.  More... | |
| size_t | hipcPbankGetPageSize (struct HIPC_pbank *const bank_p) | 
| Gets page size.  More... | |
| const void * | hipcPbankGetReadOnlyPage (struct HIPC_pbank *const bank_p) | 
| Gets a current read only page.  More... | |
| void * | hipcPbankGetWritablePage (struct HIPC_pbank *const bank_p) | 
| Gets a current writable page.  More... | |
| enum HIPC_pbank_stat | hipcPbankGetStat (struct HIPC_pbank *const bank_p) | 
| Gets current status of a bank.  More... | |
| enum HIPC_errno | hipcPbankSwitchRequest (struct HIPC_pbank *const bank_p) | 
| Requests to switch pages.  More... | |
| int | hipcPbankSwitchAccept (struct HIPC_pbank *const bank_p) | 
| Accepts a switching request and switches pages if switching is requested.  More... | |
| enum HIPC_errno | hipcPbankSwitchComplete (struct HIPC_pbank *const bank_p) | 
| Makes both pages have the same latest contents and completes the switching.  More... | |
| enum HIPC_errno | hipcPbankSwitchReqWaitCmpl (struct HIPC_pbank *const bank_p) | 
| Calls hipcPbankSwitchRequest(), waits for acceptance of the request, and calls hipcPbankSwitchComplete().  More... | |
| enum HIPC_pbank_stat | 
| void hipcPbankInit | ( | struct HIPC_pbank *const | bank_p, | 
| void *const | buf_p, | ||
| const size_t | page_size | ||
| ) | 
Initializes a parameter bank.
This function copies contents in the first half of buffer to the second half.
| bank_p | pointer to a parameter bank | 
| buf_p | a buffer whose size must be page_size multiplied by 2  | 
| page_size | size of a page | 
Definition at line 14 of file pbank.c.
References HIPC_MEM_BARRIER, HIPC_PBANK_STAT_GROUND, HIPC_pbank::page_ro_p, HIPC_pbank::page_rw_p, HIPC_pbank::page_size, and HIPC_pbank::stat.
| size_t hipcPbankGetPageSize | ( | struct HIPC_pbank *const | bank_p | ) | 
Gets page size.
| bank_p | pointer to a parameter bank | 
Definition at line 33 of file pbank.c.
References HIPC_pbank::page_size.
| const void* hipcPbankGetReadOnlyPage | ( | struct HIPC_pbank *const | bank_p | ) | 
Gets a current read only page.
| bank_p | pointer to a parameter bank | 
Definition at line 44 of file pbank.c.
References HIPC_pbank::page_ro_p.
| void* hipcPbankGetWritablePage | ( | struct HIPC_pbank *const | bank_p | ) | 
Gets a current writable page.
| bank_p | pointer to a parameter bank | 
Definition at line 55 of file pbank.c.
References HIPC_pbank::page_rw_p.
| enum HIPC_pbank_stat hipcPbankGetStat | ( | struct HIPC_pbank *const | bank_p | ) | 
Gets current status of a bank.
| bank_p | pointer to a parameter bank | 
Definition at line 66 of file pbank.c.
References HIPC_pbank::stat.
Referenced by hipcPbankSwitchReqWaitCmpl().

| enum HIPC_errno hipcPbankSwitchRequest | ( | struct HIPC_pbank *const | bank_p | ) | 
Requests to switch pages.
| bank_p | pointer to a parameter bank | 
Definition at line 77 of file pbank.c.
References HIPC_ERR_S_PBANK_STAT_MISMATCH, HIPC_MEM_BARRIER, HIPC_PBANK_STAT_GROUND, HIPC_PBANK_STAT_REQUESTED, HIPC_SUCCESS, and HIPC_pbank::stat.
Referenced by hipcPbankSwitchReqWaitCmpl().

| int hipcPbankSwitchAccept | ( | struct HIPC_pbank *const | bank_p | ) | 
Accepts a switching request and switches pages if switching is requested.
| bank_p | pointer to a parameter bank | 
| 0 | Switching is not requested. | 
| 1 | Pages have been switched. | 
Definition at line 96 of file pbank.c.
References HIPC_MEM_BARRIER, HIPC_PBANK_STAT_ACCEPTED, HIPC_PBANK_STAT_REQUESTED, HIPC_pbank::page_ro_p, HIPC_pbank::page_rw_p, and HIPC_pbank::stat.
| enum HIPC_errno hipcPbankSwitchComplete | ( | struct HIPC_pbank *const | bank_p | ) | 
Makes both pages have the same latest contents and completes the switching.
| bank_p | pointer to a parameter bank | 
Definition at line 121 of file pbank.c.
References HIPC_ERR_S_PBANK_STAT_MISMATCH, HIPC_MEM_BARRIER, HIPC_PBANK_STAT_ACCEPTED, HIPC_PBANK_STAT_GROUND, HIPC_SUCCESS, HIPC_pbank::page_ro_p, HIPC_pbank::page_rw_p, HIPC_pbank::page_size, and HIPC_pbank::stat.
Referenced by hipcPbankSwitchReqWaitCmpl().

| enum HIPC_errno hipcPbankSwitchReqWaitCmpl | ( | struct HIPC_pbank *const | bank_p | ) | 
Calls hipcPbankSwitchRequest(), waits for acceptance of the request, and calls hipcPbankSwitchComplete().
| bank_p | pointer to a parameter bank | 
Definition at line 141 of file pbank.c.
References HIPC_PBANK_STAT_REQUESTED, HIPC_SUCCESS, hipcPbankGetStat(), hipcPbankSwitchComplete(), and hipcPbankSwitchRequest().

 1.8.6