fixed some stuff

This commit is contained in:
Morten Delenk 2017-12-09 19:38:23 +00:00
parent 6214398f1e
commit d236a9e348
2 changed files with 6 additions and 7 deletions

View file

@ -7,15 +7,15 @@ void *operator new(size_t s) {
void *operator new[](size_t s) {
return (void*)(*pmm, (s+4095)/4096);
}
void *operator delete(void *p) {
void operator delete(void *p) {
(*pmm)((phys_t)p,1);
}
void *operator delete[](void *p) {
void operator delete[](void *p) {
(*pmm)((phys_t)p,1);
}
void *operator delete(void *p, size_t s) {
void operator delete(void *p, size_t s) {
(*pmm)((phys_t)p,(s+4095)/4096);
}
void *operator delete[](void *p, size_t s) {
void operator delete[](void *p, size_t s) {
(*pmm)((phys_t)p,(s+4095)/4096);
}

View file

@ -1,5 +1,6 @@
#pragma once
#include <function.hpp>
#include <stdint.h>
struct PXIcmd {
uint32_t conid;
uint32_t cmdid;
@ -23,13 +24,11 @@ struct PXI {
function<PXIreply(PXIcmd)> pxi_handlers[16];
uint32_t connid;
PXI();
~PXI();
void set_cmd_handler(uint32_t cmd, function<PXIreply(PXIcmd)> handler);
void send_cmd(PXIcmd command, function<void(PXIreplay)> callback);
void send_cmd(PXIcmd command, function<void(PXIreply)> callback);
void main_loop();
void
};
extern PXI pxi;