Skip to content

Commit f42f9d9

Browse files
committed
Remove outdated multi-program userspace coordination example from SPEC.md and add a closing code block for clarity.
1 parent 83f2cb4 commit f42f9d9

1 file changed

Lines changed: 1 addition & 26 deletions

File tree

SPEC.md

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,7 @@ impl my_bbr {
789789
// State transitions
790790
}
791791
}
792+
```
792793

793794
### 3.6 Custom Kernel Functions (kfunc)
794795

@@ -1451,32 +1452,6 @@ fn register(ops) -> i32
14511452
- The compiler determines the registration method based on the impl block attribute
14521453
- Impl blocks provide a cleaner syntax compared to struct initialization
14531454

1454-
// Multi-program userspace coordination
1455-
fn main() -> i32 {
1456-
// Load all programs
1457-
var ingress_handle = load(ingress_monitor)
1458-
var egress_handle = load(egress_monitor)
1459-
var security_handle = load(security_check)
1460-
1461-
// Attach in specific order for coordinated monitoring
1462-
attach(security_handle, "socket_connect", 0)
1463-
attach(ingress_handle, "eth0", 0)
1464-
attach(egress_handle, "eth0", 1) // Egress direction
1465-
1466-
// Register struct_ops using impl block
1467-
register(my_bbr)
1468-
1469-
print("Multi-program monitoring system with BBR congestion control active")
1470-
1471-
// Event processing loop
1472-
while (true) {
1473-
process_events()
1474-
sleep(1000)
1475-
}
1476-
1477-
return 0
1478-
}
1479-
```
14801455

14811456
## 4. Type System
14821457

0 commit comments

Comments
 (0)