[ SYSTEM ]: Linux srv.persadacompanies.com 4.18.0-553.56.1.el8_10.x86_64 #1 SMP Tue Jun 10 05:00:59 EDT 2025 x86_64
[ SERVER ]: Apache | PHP: 8.4.19
[ USER ]: persadamedika | IP: 45.64.1.108
GEFORCE FILE MANAGER
/
usr
/
src
/
file_protector-1.1-1589
/
transport
/
UPLOAD:
NAME
SIZE
QUICK PERMS
ACTIONS
📄 device.c
1,233 B
SET
[ EDIT ]
|
[ DEL ]
📄 device.h
257 B
SET
[ EDIT ]
|
[ DEL ]
📄 exec_event.c
7,518 B
SET
[ EDIT ]
|
[ DEL ]
📄 exec_event.h
391 B
SET
[ EDIT ]
|
[ DEL ]
📄 exit_event.c
1,535 B
SET
[ EDIT ]
|
[ DEL ]
📄 exit_event.h
291 B
SET
[ EDIT ]
|
[ DEL ]
📄 fork_event.c
9,026 B
SET
[ EDIT ]
|
[ DEL ]
📄 fork_event.h
360 B
SET
[ EDIT ]
|
[ DEL ]
📄 fs_event.c
37,830 B
SET
[ EDIT ]
|
[ DEL ]
📄 fs_event.h
3,674 B
SET
[ EDIT ]
|
[ DEL ]
📄 message.c
22,398 B
SET
[ EDIT ]
|
[ DEL ]
📄 message.h
4,170 B
SET
[ EDIT ]
|
[ DEL ]
📄 ring.h
2,347 B
SET
[ EDIT ]
|
[ DEL ]
📄 set.h
1,911 B
SET
[ EDIT ]
|
[ DEL ]
📄 subtype.h
4,354 B
SET
[ EDIT ]
|
[ DEL ]
📄 thread_safe_path.h
2,330 B
SET
[ EDIT ]
|
[ DEL ]
📄 transport.c
77,315 B
SET
[ EDIT ]
|
[ DEL ]
📄 transport.h
5,314 B
SET
[ EDIT ]
|
[ DEL ]
📄 transport_id.h
1,789 B
SET
[ EDIT ]
|
[ DEL ]
DELETE SELECTED
[ CLOSE ]
EDIT: set.h
/** @file @brief 'set' @details Copyright (c) 2021 Acronis International GmbH @author Mikhail Krivtsov (mikhail.krivtsov@acronis.com) @since $Id: $ */ #pragma once #include <linux/types.h> // bool, [u]int(8|16|32|64)_t, pid_t, size_t typedef struct { void *buffer; size_t item_size; unsigned capacity; unsigned count; unsigned count_max; } set_t; static inline void set_init(set_t *set, void *buffer, size_t buffer_size, size_t item_size) { set->buffer = buffer; set->item_size = item_size; set->capacity = buffer_size / item_size; set->count = 0; set->count_max = 0; } static inline void *set_buffer(set_t *set) { return set->buffer; } static inline unsigned set_fetch_capacity(set_t *set) { return set->capacity; } static inline void *set_ptr_next(set_t *set, void *item_ptr) { return (void *) ((char *)item_ptr + set->item_size); } static inline void *set_item_ptr(set_t *set, unsigned item_index) { return (void *) (item_index * set->item_size + (char *)set->buffer); } static inline void *set_begin_ptr(set_t *set) { return set_item_ptr(set, 0); } static inline void *set_end_ptr(set_t *set) { return set_item_ptr(set, set->count); } static inline unsigned set_items_count(set_t *set) { return set->count; } static inline void set_items_count_set(set_t *set, unsigned count) { set->count = count; if (set->count_max < count) { set->count_max = count; } } static inline unsigned set_items_count_dec(set_t *set) { return --set->count; } static inline unsigned set_items_count_inc(set_t *set) { unsigned count = ++set->count; if (set->count_max < count) { set->count_max = count; } return count; } static inline unsigned set_items_count_max(set_t *set) { return set->count_max; } static inline bool set_is_empty(set_t *set) { return !set_items_count(set); } static inline bool set_is_full(set_t *set) { return set_items_count(set) >= set->capacity; }