|
static void * | rdr_freelist_alloc (rdr_freelist_t **plist, size_t size) |
|
static void | rdr_freelist_release (rdr_freelist_t **plist, void *ptr) |
|
int | rdr_hashmap_create (void) |
|
void | rdr_hashmap_destroy (void) |
|
rdr_lookup_t * | lookup_acquire_classtype (sw_rdr_class Class, sw_rdr_type Type) |
|
static rdr_lookup_t * | lookup_acquire_named (sw_rdr_namespace Namespace, const char *name, size_t length) |
|
static rdr_lookup_t * | new_lookup (void) |
|
static rdr_lookup_t * | lookup_acquire_create (intptr_t key, rdr_lookup_t *inlookup) |
|
void | lookup_release (rdr_lookup_t **plookup) |
|
static void | move_iterator (sw_rdr_iterator *find, sw_rdr_iterator **from, sw_rdr_iterator **to) |
|
static sw_rdr * | find_rdr (sw_rdr_iterator *find, int unlock) |
| Find an rdr from an iterator structure. More...
|
|
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
|
|
static sw_rdr_iterator * | new_iterator (int32 flags) |
| Create a new iterator and add it to the list.
|
|
void | unlock_previous_rdr (sw_rdr_iterator *iterator) |
| Unlock a previously locked RDR.
|
|
static sw_rdr_result | find_next_rdr (sw_rdr_iterator *iterator, sw_rdr_class *pclass, sw_rdr_type *ptype, sw_rdr_id *pid, void **pptr, size_t *plength, HqBool lock) |
| Find and optionally lock an RDR from an iterator. More...
|
|
static sw_rdr * | init_rdr (sw_rdr *rdr, sw_rdr_class rdrclass, sw_rdr_type rdrtype, sw_rdr_id rdrid, void *ptr, size_t length, sw_rdr_priority priority) |
| Initialise a new sw_rdr structure, but don't add it.
|
|
This file implements the RIP Data Resource (RDR) System.
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.
The RDR API is primarily used to share blocks of data between the skin and core, or in general, between multiple Providers and Consumers.
Find an rdr from an iterator structure.
This is the central find routine used by all API find and iterate calls, and used internally by the (de)registration calls.
As well as finding the first matching RDR for a particular set of criteria, it returns the parent of the returned RDR (or the last in the list), and the next RDR to check (for continuing the search).
Note that when multithreading this function MUST be protected by mutex on entry. It can optionally unlock the mutex during the search.
- Parameters
-
[in] | find | The iterator to use and update. When multithreading, access to iterators MUST be protected by mutex. |
[in] | unlock | TRUE if called with a mutex that is to be unlocked during the iteration. The concurrency count is incremented and the mutex unlocked, then locked and decremented on exit. |
- Returns
- The RDR found, or NULL. Note that when multithreading the RDR found by find_rdr() could nevertheless be deregistered before this function has returned so must be protected against by the caller using mutex.