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

Function insert_timeout

src/backend/utils/misc/timeout.c:112–130  ·  view source on GitHub ↗

* Insert specified timeout reason into the list of active timeouts * at the given index. */

Source from the content-addressed store, hash-verified

110 * at the given index.
111 */
112static void
113insert_timeout(TimeoutId id, int index)
114{
115 int i;
116
117 if (index < 0 || index > num_active_timeouts)
118 elog(FATAL, "timeout index %d out of range 0..%d", index,
119 num_active_timeouts);
120
121 Assert(!all_timeouts[id].active);
122 all_timeouts[id].active = true;
123
124 for (i = num_active_timeouts - 1; i >= index; i--)
125 active_timeouts[i + 1] = active_timeouts[i];
126
127 active_timeouts[index] = &all_timeouts[id];
128
129 num_active_timeouts++;
130}
131
132/*
133 * Remove the index'th element from the timeout list.

Callers 1

enable_timeoutFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected