Loom C API
Public Loom compiler C API
Toggle main menu visibility
Loading...
Searching...
No Matches
task_queue.h
Go to the documentation of this file.
1
// Copyright 2026 The IREE Authors
2
//
3
// Licensed under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
7
#ifndef LOOMC_TASK_QUEUE_H_
8
#define LOOMC_TASK_QUEUE_H_
9
10
#include "
loomc/task.h
"
11
#include "
loomc/task_pool.h
"
12
21
22
#ifdef __cplusplus
23
extern
"C"
{
24
#endif
25
27
typedef
struct
loomc_task_queue_t
loomc_task_queue_t
;
28
41
LOOMC_API_EXPORT
loomc_status_t
loomc_task_queue_allocate
(
42
const
loomc_task_pool_t
* pool,
loomc_allocator_t
allocator,
43
loomc_task_queue_t
** out_queue);
44
52
LOOMC_API_EXPORT
loomc_task_sink_t
53
loomc_task_queue_sink
(
loomc_task_queue_t
* queue);
54
64
LOOMC_API_EXPORT
loomc_status_t
65
loomc_task_queue_shutdown
(
loomc_task_queue_t
* queue);
66
74
LOOMC_API_EXPORT
loomc_status_t
75
loomc_task_queue_await_shutdown
(
loomc_task_queue_t
* queue);
76
83
LOOMC_API_EXPORT
void
loomc_task_queue_free
(
loomc_task_queue_t
* queue);
84
85
#ifdef __cplusplus
86
}
// extern "C"
87
#endif
88
89
#endif
// LOOMC_TASK_QUEUE_H_
LOOMC_API_EXPORT
#define LOOMC_API_EXPORT
Exports a public Loom C API symbol from a shared library build.
Definition
base.h:34
loomc_status_t
struct iree_status_handle_t * loomc_status_t
Opaque status handle.
Definition
base.h:55
loomc_allocator_t
Host allocator used for persistent Loom object storage.
Definition
base.h:390
loomc_task_sink_t
Borrowed destination for generic tasks.
Definition
task.h:106
task.h
Generic caller-scheduled work.
task_pool.h
Optional standard worker population for concurrent application work.
loomc_task_pool_t
struct loomc_task_pool_t loomc_task_pool_t
Opaque standard task pool.
Definition
task_pool.h:30
loomc_task_queue_sink
loomc_task_sink_t loomc_task_queue_sink(loomc_task_queue_t *queue)
Returns a borrowed generic task sink backed by queue.
loomc_task_queue_free
void loomc_task_queue_free(loomc_task_queue_t *queue)
Drains, awaits, and frees queue.
loomc_task_queue_allocate
loomc_status_t loomc_task_queue_allocate(const loomc_task_pool_t *pool, loomc_allocator_t allocator, loomc_task_queue_t **out_queue)
Allocates a task queue attached to pool.
loomc_task_queue_await_shutdown
loomc_status_t loomc_task_queue_await_shutdown(loomc_task_queue_t *queue)
Waits until every accepted task has drained and the queue process releases.
loomc_task_queue_shutdown
loomc_status_t loomc_task_queue_shutdown(loomc_task_queue_t *queue)
Stops accepting new tasks and begins draining accepted work.
loomc_task_queue_t
struct loomc_task_queue_t loomc_task_queue_t
Opaque generic task queue.
Definition
task_queue.h:27
loomc
task_queue.h
Generated by
1.17.0