This file provides definitions for the core RIP Data Resource API. More...
#include "std.h"
#include "mem.h"
#include "rhhashmap.h"
#include "threadapi.h"
#include "rdrapi.h"
#include "eventapi.h"
Data Structures | |
struct | sw_rdr |
Our internal representation of an RDR registration. More... | |
struct | rdr_key_t |
The key structure used for the RDR hash map. More... | |
struct | rdr_lookup_t |
struct | sw_rdr_iterator |
Our private iterator structure. More... | |
Typedefs | |
typedef struct sw_rdr | sw_rdr |
Our internal representation of an RDR registration. More... | |
typedef struct rdr_key_t | rdr_key_t |
The key structure used for the RDR hash map. | |
typedef struct rdr_lookup_t | rdr_lookup_t |
Enumerations | |
enum | rdr_iterator_flags { CHECK_CLASS = 1 , CHECK_TYPE = 2 , CHECK_ID = 4 , CHECK_PRIORITY = 8 , ITERATOR_DEAD = 16 , ITERATOR_BUSY = 32 , ITERATE_PRIORITIES = 64 , CHECK_ANY = 0 , CHECK_ALL = CHECK_CLASS|CHECK_TYPE|CHECK_ID , CHECK_INSERT = CHECK_ALL|CHECK_PRIORITY , CHECK_DUPLICATES = CHECK_ALL|ITERATE_PRIORITIES } |
Iterator flags. More... | |
Functions | |
rdr_lookup_t * | lookup_acquire_classtype (sw_rdr_class Class, sw_rdr_type Type) |
void | lookup_release (rdr_lookup_t **plookup) |
int | rdr_hashmap_create (void) |
void | rdr_hashmap_destroy (void) |
void | link_iterator (sw_rdr_iterator *iterator, sw_rdr_iterator **list) |
Link an iterator into a list. | |
void | unlink_iterator (sw_rdr_iterator *iterator) |
unlink an iterator from either list | |
void | unlock_previous_rdr (sw_rdr_iterator *iterator) |
Unlock a previously locked RDR. | |
This file provides definitions for the core RIP Data Resource API.
Copyright (C) 2023 Global Graphics Software Ltd. All rights reserved. This source code contains the confidential and trade secret information of Global Graphics Software Ltd. It may not be used, copied or distributed for any reason except as set forth in the applicable Global Graphics license agreement.
typedef struct rdr_lookup_t rdr_lookup_t |
The value structure stored in the hash map. This is the head of a list of RDRs sorted by Id and Priority.
Our internal representation of an RDR registration.
These are never exposed to Providers or Consumers.
Currently this is a linked list stored in ascending order of Class, Type, Id and descending Priority, but this may be restructured if the RDR system gains significant use.
Note that when multithreading, an RDR could conceivably be deregistered by another thread after it has been found but before it has been accessed, so all such usage MUST be protected by mutex.
enum rdr_iterator_flags |
Iterator flags.
rdr_lookup_t* lookup_acquire_classtype | ( | sw_rdr_class | Class, |
sw_rdr_type | Type | ||
) |
Lookup an existing RDR list using Class,Type and acquire a reference count.
[in] | Class | The class of the lookup to perform. |
[in] | Type | The type of the lookup to perform. |
This function must be called with the RDR mutex locked.
void lookup_release | ( | rdr_lookup_t ** | plookup | ) |
Release a reference to an RDR lookup, freeing it and removing from the map if necessary. This must be called with the mutex locked.
int rdr_hashmap_create | ( | void | ) |
Glue function to create the map of RDRs.
void rdr_hashmap_destroy | ( | void | ) |
Glue function to destroy the map of RDRs.