1. A hardware control method for multitasking drivers under a user mode, comprising: receiving a request for access to a hardware device from a first process under the user mode, wherein the request comprises a first identification corresponding to the first process; determining whether the first process has obtained a mutual exclusion (mutex) of the hardware device; when the first process has obtained the mutex, determining whether the first identification and a second identification corresponding to a second process previously accessed the hardware device are same; and when the first identification and the second identification are different, performing a context switch on the first process and the second process to allow the first process to access the hardware device.