kernel: remove some unescessary inits

This commit is contained in:
Matheus
2025-07-23 18:21:10 -03:00
parent 819551330b
commit 98be724c65
5 changed files with 9 additions and 31 deletions
+1 -5
View File
@@ -30,7 +30,7 @@ typedef struct {
#define ALLOC_RANGE_START 50000
#define ALLOC_RANGE_END 60000
static socket_t *ports[65536];
static spinlock_t portlock;
static SPINLOCK_DEFINE(portlock);
int udp_sendpacket(iovec_iterator_t *iovec_iterator, size_t size, uint32_t ip, uint16_t srcport, uint16_t dstport, netdev_t *broadcastnetdev) {
void *newbuff = alloc(size + sizeof(udpframe_t));
@@ -56,10 +56,6 @@ int udp_sendpacket(iovec_iterator_t *iovec_iterator, size_t size, uint32_t ip, u
return error;
}
void udp_init() {
SPINLOCK_INIT(portlock);
}
int udp_allocport(socket_t *socket, uint16_t *port) {
bool intstate = interrupt_set(false);
spinlock_acquire(&portlock);