globus_handle_table.h(3)

πŸ“¦
version 18.15 Β· 6 versions
, in epel 10, fedora 43, fedora 44, ubuntu resolute, ubuntu stonking

πŸ’– globus_handle_table.h β€” NAME πŸ’–

okay so bestie, gather round: this is globus_handle_table.h, and it's the Handle Table for Reference Counting Data. that's the whole vibe. it's a header from globus_common, and it lives in the Library Functions Manual section, fr fr.


✨ SYNOPSIS ✨

the way you pull this whole thing in is literally just:

#include 'globus_types.h'

that's it. that's the door. πŸšͺ✨


πŸŽ€ Macros πŸŽ€

  • #define GLOBUS_NULL_HANDLE β€” the null handle, no cap. your go-to "nothing here" handle value.

πŸ¦‹ Typedefs πŸ¦‹

  • typedef struct globus_l_handle_table_s * globus_handle_table_t β€” this is the handle table abstract type. it's abstract, it's mysterious, it's giving main character energy. you don't poke at its insides, you just use it. πŸ’…
  • typedef int globus_handle_t β€” and this is the handle abstract type. yes bestie, it's literally an int under there, but we're being ~abstract~ about it.
  • typedef void(* globus_handle_destructor_t) (void *datum) β€” the handle datum destructor. it's a function pointer that takes a void *datum and returns void, and it's the thing that gets called to clean up your datum when the refs all run out. iconic behaviour. 🧹

πŸ‘‘ Functions πŸ‘‘

  • int globus_handle_table_init (globus_handle_table_t *handle_table, globus_handle_destructor_t destructor) β€” sets up your handle table, and takes the destructor it's gonna use. (the original page gives this one no extra blurb, so i'm not gonna invent one. respect the source. πŸ™ˆ)
  • int globus_handle_table_destroy (globus_handle_table_t *handle_table) β€” Destroy a handle table. dramatic? maybe. accurate? absolutely.
  • globus_handle_t globus_handle_table_insert (globus_handle_table_t *handle_table, void *datum, int initial_refs) β€” drops a datum into the table with initial_refs references and hands you back a handle. (again, no extra blurb in the original β€” just the signature, and i'm not making stuff up.)
  • globus_bool_t globus_handle_table_increment_reference (globus_handle_table_t *handle_table, globus_handle_t handle) β€” Add a reference to a handle table entry. one more bestie holding on. 🫢
  • globus_bool_t globus_handle_table_increment_reference_by (globus_handle_table_t *handle_table, globus_handle_t handle, unsigned int inc) β€” Increment the reference count for handle. but, like, by inc at once, because sometimes you gotta bulk-buy your references. πŸ”₯
  • globus_bool_t globus_handle_table_decrement_reference (globus_handle_table_t *handle_table, globus_handle_t handle) β€” Remove a reference to a handle.</p> when the count hits the floor, that destructor you registered earlier gets its moment. 😭
  • void * globus_handle_table_lookup (globus_handle_table_t *handle_table, globus_handle_t handle) β€” Resolve a handle its datum. you hand it the handle, it hands you back the actual void * thing you stashed. the glow-up from handle to datum. ⭐

🌸 Detailed Description 🌸

Handle Table for Reference Counting Data.

that's the whole point of this header. handle table. reference counting. data. slay. ✨


🫢 Author 🫢

Generated automatically by Doxygen for globus_common from the source code. not a human bestie, a robot bestie. be nice to it. πŸ€–πŸ’œ


okay that's the whole page, and here's your cute sign-off: this lil' page is globus_handle_table.h(3) from globus_common, Version 18.15. go forth and reference count responsibly, bestie. periodt. πŸ’…πŸŽ€πŸ¦‹πŸŒˆ