Harvey-OS / harvey

A distributed operating system
https://harvey-os.org/
MIT License
1.44k stars 105 forks source link

Dev create signature changed to return Chan* #1123

Closed gmacd closed 3 years ago

gmacd commented 3 years ago

Device create functions changed to return Chan* created, similar to open. Required for integration of devshr.

Looks to have been added because shrcreate has a path where a new Chan is created, in which case it wants to sent the new chan rather than the one passed in.

As mentioned in slack, the 9front commit this change is based on is: https://code.9front.org/hg/plan9front/rev/2e0310025a75

changeset:   771:2e0310025a75
user:        cinap_lenrek@centraldogma
date:        Wed Aug 17 23:27:31 2011 +0200
summary:     change definition of Chan.create to return a chan like open

Signed-off-by: Graham MacDonald grahamamacdonald@gmail.com

gmacd commented 3 years ago

I've updated the description to reference the 9front commit this change is based on, and the reason behind it.