<div dir="ltr">Hi<div><br></div><div>In working on the Microblaze port, it occurred to me that the prototypes for the context switch methods are always the same. The structures vary, not the signatures. What do you all think of making a separate header that can be included from various cpu.h files to avoid repeating them?</div><div><br></div><div>Similarly, swap u32 and u16 are often the duplicated generic ones. A single header with those which ports can include if they use the generic implementation would also reduce some bulk.</div><div><br></div><div>My rough calculation is that a shared header for CPU Context method prototypes saves about 75 lines every time it is included which should eliminate somewhere between 1300 and 1500 lines in the ports.</div><div><br></div><div>An alternative, slightly more aggressive,  approach be to prototype all the port required methods in one file and then let every port include that. It would eliminate even more. This would pick up _CPU_Initialize and a few others like _CPU_Thread_Idle. Just by honoring some of the existing conditionals.</div><div><br></div><div>Thoughts?</div><div><br></div><div>--joel</div></div>