FS: enhance file_allocate_from_tcb() mulit-threads saftey & remove memcpy when close the fd
Summary
FS: enhance file_allocate_from_tcb() mulit-threads saftey & remove memcpy when close the fd
Impact
FS
Testing
BES boards
@GUIDINGLI I liked it removed two nested while()s with a single for() and it seems to simplify and improve performance. I'm afraid of the impacts, did you test using ostest and more extensive testing? Also since Tiago noticed the stack usage impact caused by #11777 could you confirm this modification will not increase code and/or stack usage too much?
@GUIDINGLI please rebase your patch.
@GUIDINGLI I liked it removed two nested while()s with a single for() and it seems to simplify and improve performance. I'm afraid of the impacts, did you test using ostest and more extensive testing? Also since Tiago noticed the stack usage impact caused by #11777 could you confirm this modification will not increase code and/or stack usage too much?
@acassis The original code also has two nested while()s, and I don't think it will take more stack usage then the previous. And this PR's purpose is enhance the safety, because: file_allocate_from_tcb() hasn't fully protected by spin_lock_irqsave().