mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-10-31 06:28:22 +00:00
kernel: remove some unescessary inits
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user