MCPcopy Create free account
hub / github.com/apache/cloudberry / ExecParallelHashPushTuple

Function ExecParallelHashPushTuple

src/backend/executor/nodeHash.c:3962–3975  ·  view source on GitHub ↗

* Insert a tuple at the front of a chain of tuples in DSA memory atomically. */

Source from the content-addressed store, hash-verified

3960 * Insert a tuple at the front of a chain of tuples in DSA memory atomically.
3961 */
3962static inline void
3963ExecParallelHashPushTuple(dsa_pointer_atomic *head,
3964 HashJoinTuple tuple,
3965 dsa_pointer tuple_shared)
3966{
3967 for (;;)
3968 {
3969 tuple->next.shared = dsa_pointer_atomic_read(head);
3970 if (dsa_pointer_atomic_compare_exchange(head,
3971 &tuple->next.shared,
3972 tuple_shared))
3973 break;
3974 }
3975}
3976
3977/*
3978 * Prepare to work on a given batch.

Calls

no outgoing calls

Tested by

no test coverage detected