Skip to content

Commit 8238e03

Browse files
committed
Drop dead byte-array fields from map_operations_demo
Signed-off-by: Cong Wang <cwang@multikernel.io>
1 parent d9705ed commit 8238e03

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

examples/map_operations_demo.ks

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// Map Operations Semantics Demo for KernelScript
22
// Demonstrates advanced map operation analysis, concurrent access safety,
33
// and global map sharing validation capabilities
4-
//
5-
// NOTE: This file uses advanced language features not yet implemented in KernelScript.
64

75
include "xdp.kh"
86
include "tc.kh"
@@ -21,7 +19,6 @@ struct Statistics {
2119

2220
struct PerCpuData {
2321
local_counter: u64,
24-
temp_storage: u8[64],
2522
}
2623

2724
// Global maps shared across multiple programs with the new simplified syntax
@@ -44,7 +41,6 @@ var sequential_data : array<u32, ArrayElement>(1024)
4441
struct Event {
4542
timestamp: u64,
4643
event_type: u32,
47-
data: u8[32],
4844
}
4945

5046
struct ArrayElement {
@@ -75,7 +71,6 @@ struct ArrayElement {
7571
} else {
7672
percpu_data[cpu_id] = PerCpuData {
7773
local_counter: 1,
78-
temp_storage: [0],
7974
}
8075
}
8176

@@ -131,7 +126,6 @@ fn event_logger(ctx: *trace_event_raw_sys_enter) -> i32 {
131126
// Successfully reserved space - populate event data inline
132127
reserved->timestamp = 123456 // Fake timestamp
133128
reserved->event_type = ctx->id // Use syscall ID from sys_enter context
134-
reserved->data = [0] // Simplified data
135129

136130
// Submit the populated event
137131
event_stream.submit(reserved)

0 commit comments

Comments
 (0)