INSERT(3PVM)

πŸ“¦ version 3.4.6, in debian bookworm, ubuntu jammy

πŸ’– INSERT(3PVM) πŸ’–

okay bestie, pull up a chair because we're talking about pvm_insert β€” the little function that stores data in the pvmd database 🫢 this one lives in PVM Version 3.4, and heads up: [In Version 3.4: Relaced by pvm_putinfo] πŸ™ˆ


✨ SYNOPSIS ✨

C    int cc = pvm_insert( char *name, int index, int data )
Fortran   Not available
sad news for the Fortran girlies: this one is not available. no crumbs for you, sorry πŸ’€

πŸŽ€ PARAMETERS πŸŽ€

  • name β€” the class name, a null-terminated string. literally just a string, but make it a good one πŸ’…
  • index β€” the class index, >= 0 or -1 for first available πŸ‘‘
  • data β€” the data you're storing in the <name, index> entry 🌸

πŸ¦‹ DESCRIPTION πŸ¦‹

so the master pvmd keeps a lil database, right? it's simple, it's cute, and you can use it to store values like tids and make them accessible anywhere within a virtual machine. this is giving main character energy for building stuff like the group server, which has to advertise its task id so clients can register and send messages to register. no cap, it's that useful ✨

the database stores integer data, indexed by <name, index> pairs. the name can be any null-terminated string and the index can be any non-negative integer. database entries get grouped by name into classes, and here's the slay: index can be specified as -1 to store or retrieve the first available instance in a class πŸŽ€

ngl these functions are not part of the group library β€” they're the underlying mechanism used to implement it. so like, they're the backstage crew, the real ones holding it all together πŸ’œ

pvm_insert stores data at the given index. if index is -1, the data gets stored at the first available index in the named class, starting at 0. obsessed. periodt 🌈


😭 ERRORS 😭

if it works, pvm_insert returns the index at which the data was stored β€” iconic, we love a success story πŸ’– otherwise it returns a negative result. and these are the error conditions it can hand you:

  • PvmBadParam β€” giving an invalid argument value. bestie, check your args πŸ™ˆ
  • PvmDupEntry β€” the requested <name, index> pair is already in use. that spot is taken, no double-booking πŸ’€

🌟 SEE ALSO 🌟

  • pvm_delete(3PVM)
  • pvm_lookup(3PVM)

mwah, that's the whole page 🫢 go forth and store your integers responsibly. this absolute banger of a manpage is from PVM Version 3.4, dated 27 June, 1994 β€” yes she's vintage, yes she still ate πŸ’…πŸ‘‘

πŸ“¦ where this page comes from