Ripples 1.0
High Performant Software Architecture For Transaction Processing
Loading...
Searching...
No Matches
resource_loop.c File Reference
#include <assert.h>
#include <errno.h>
#include <fcntl.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <sys/stat.h>
#include <time.h>
#include <unistd.h>
#include "resource.h"
#include "channel.h"
#include "config.h"
#include "constants.h"
#include "utils.h"
Include dependency graph for resource_loop.c:

Enumerations

enum  resource_loop_states { CHECK_RESOURCE = 0 , GET_NEXT_RESOURCE , WAIT_FOR_RESOURCE_UPDATE }
 

Functions

static bool resource_vls_notified (channel_bss_t *resource_channels, bool *vl_notifications, size_t count)
 
void * resource_loop (void *args)
 

Detailed Description

Author
Faruk Grozdanic

Copyright (c) 2025 Faruk Grozdanic

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Enumeration Type Documentation

◆ resource_loop_states

Resource loop function states.

Function Documentation

◆ resource_vls_notified()

static bool resource_vls_notified ( channel_bss_t resource_channels,
bool *  vl_notifications,
size_t  count 
)
static

Function checks if all vectorloop threads have signaled the resource thread that they processed the latest resource change they were notified of.

Note
This is a helper function for resource_loop().
Parameters
resource_channelsArray of resource channels.
vl_notificationsArray of vector loop notifications.
countSize of arrays. They MUST both match in size.
Returns
Returns true if all vectorloop threads have processed latest resource update, otherwise returns false.
Here is the call graph for this function:
Here is the caller graph for this function: