Functions | |
__BEGIN_DECLS int32_t | sync_merge (const char *name, int32_t fd1, int32_t fd2) |
struct sync_file_info * | sync_file_info (int32_t fd) |
void | sync_file_info_free (struct sync_file_info *info) |
Function Documentation
◆ sync_file_info()
struct sync_file_info* sync_file_info | ( | int32_t | fd | ) |
Retrieve detailed information about a sync file and its fences.
The returned sync_file_info must be freed by calling sync_file_info_free().
◆ sync_file_info_free()
void sync_file_info_free | ( | struct sync_file_info * | info | ) |
Free a struct sync_file_info structure
◆ sync_merge()
__BEGIN_DECLS int32_t sync_merge | ( | const char * | name, |
int32_t | fd1, | ||
int32_t | fd2 | ||
) |
Merge two sync files.
This produces a new sync file with the given name which has the union of the two original sync file's fences; redundant fences may be removed.
If one of the input sync files is signaled or invalid, then this function may behave like dup(): the new file descriptor refers to the valid/unsignaled sync file with its original name, rather than a new sync file.
The original fences remain valid, and the caller is responsible for closing them.