Device IRQs WIP
This commit is contained in:
@@ -9,8 +9,10 @@
|
||||
#include <libk/string.h>
|
||||
#include <status.h>
|
||||
#include <sys/debug.h>
|
||||
#include <proc/proc.h>
|
||||
#include <proc/reschedule.h>
|
||||
|
||||
static int device_probe_partitions_dos (struct device* device) {
|
||||
static int device_probe_partitions_dos (struct proc* proc, struct reschedule_ctx* rctx, struct device* device) {
|
||||
struct dos_mbr mbr;
|
||||
memset (&mbr, 0, sizeof (mbr));
|
||||
size_t sector = 0;
|
||||
@@ -27,9 +29,9 @@ static int device_probe_partitions_dos (struct device* device) {
|
||||
|
||||
spin_lock (&device->lock);
|
||||
|
||||
device_op (device, XDRV_GET_SECTOR_SIZE, NULL, NULL, §or_size);
|
||||
device_op (device, XDRV_GET_SECTOR_SIZE, proc, rctx, §or_size);
|
||||
|
||||
int ret = device_op (device, XDRV_READ, NULL, NULL, §or, §or_count, &mbr);
|
||||
int ret = device_op (device, XDRV_READ, proc, rctx, §or, §or_count, &mbr);
|
||||
|
||||
if (ret < 0) {
|
||||
spin_unlock (&device->lock);
|
||||
@@ -54,7 +56,7 @@ static int device_probe_partitions_dos (struct device* device) {
|
||||
memset (key, 0, sizeof (key));
|
||||
snprintf (key, sizeof (key), "%sp%zu", device->key, i);
|
||||
|
||||
device_create (key, ops, lengthof (ops), &partdrv_init, &partdrv_fini, &init);
|
||||
device_create (key, ops, lengthof (ops), &partdrv_init, &partdrv_fini, &init, proc, rctx);
|
||||
}
|
||||
|
||||
spin_unlock (&device->lock);
|
||||
@@ -62,4 +64,4 @@ static int device_probe_partitions_dos (struct device* device) {
|
||||
return ST_OK;
|
||||
}
|
||||
|
||||
int device_probe_partitions (struct device* device) { return device_probe_partitions_dos (device); }
|
||||
int device_probe_partitions (struct proc* proc, struct reschedule_ctx* rctx, struct device* device) { return device_probe_partitions_dos (proc, rctx, device); }
|
||||
|
||||
Reference in New Issue
Block a user