mirror of
https://github.com/schoebel/mars
synced 2024-12-27 17:12:32 +00:00
if: redirect messages of external threads to resource channels
This commit is contained in:
parent
f88c3c12ad
commit
ea9068e992
@ -29,7 +29,7 @@
|
||||
#define SAY_ORDER 0
|
||||
#define SAY_BUFMAX (PAGE_SIZE << SAY_ORDER)
|
||||
#define MAX_FILELEN 16
|
||||
#define MAX_IDS 64
|
||||
#define MAX_IDS 1000
|
||||
|
||||
char *say_class[MAX_SAY_CLASS] = {
|
||||
[SAY_DEBUG] = "debug",
|
||||
|
@ -274,6 +274,8 @@ if_make_request(struct request_queue *q, struct bio *bio)
|
||||
int total_len = bio->bi_size;
|
||||
int error = -ENOSYS;
|
||||
|
||||
bind_to_channel(brick->say_channel, current);
|
||||
|
||||
MARS_IO("bio %p "
|
||||
"size = %d "
|
||||
"rw = %d "
|
||||
@ -576,6 +578,8 @@ err:
|
||||
#endif
|
||||
|
||||
done:
|
||||
remove_binding_from(brick->say_channel, current);
|
||||
|
||||
#ifdef BIO_CPU_AFFINE
|
||||
return error;
|
||||
#else
|
||||
@ -661,6 +665,8 @@ static int if_switch(struct if_brick *brick)
|
||||
|
||||
if (brick->power.button && brick->power.led_off) {
|
||||
mars_power_led_off((void*)brick, false);
|
||||
brick->say_channel = get_binding(current);
|
||||
|
||||
capacity = compute_capacity(brick);
|
||||
status = -ENOMEM;
|
||||
q = blk_alloc_queue(GFP_MARS);
|
||||
|
Loading…
Reference in New Issue
Block a user