iovec: initial implementation

This commit is contained in:
Matheus
2024-09-20 12:51:36 -03:00
parent 9015014804
commit dce1edad26
5 changed files with 281 additions and 14 deletions
+1 -14
View File
@@ -2,6 +2,7 @@
#define _ABI_H
#include <time.h>
#include <kernel/iovec.h>
typedef int pid_t;
typedef int tid_t;
@@ -115,20 +116,6 @@ typedef struct {
char sun_path[108];
} __attribute__((packed)) unaddr_t;
typedef struct {
void *addr;
size_t len;
} iovec_t;
static inline size_t iovec_size(iovec_t *iovec, size_t count) {
size_t size = 0;
for (int i = 0; i < count; ++i)
size += iovec[i].len;
return size;
}
typedef struct {
void *addr;
size_t addrlen;