1. A hardware control method for multitasking drivers under a user mode, comprising: performing driver initialization for a current process under the user mode, comprising: establishing a process image file to store register values exclusive to said current process for a hardware device; and establishing a shared image file to store hardware device register values shared among processes; receiving a request for access to the hardware device from the current process under the user mode, wherein the request comprises a current identifier corresponding to the current process; determining whether the current process has obtained a mutual exclusion (mutex) of the hardware device; when the current process has obtained the mutex, determining whether the current identifier and a prior identifier corresponding to a prior process that previously accessed the hardware device are the same; and when the current identifier and the prior identifier are different, performing a context switch to the current process from the prior process to allow the current process to access the hardware device, comprising: reading said register values exclusive to said current process from said process image file; and writing said register values exclusive to said current process to said process image file; when the current process has obtained the mutex, determining whether an identifier of a first thread corresponding to the current process and an identifier of a second thread corresponding to the prior process having previously obtained the mutex are the same; when the identifier of the first thread and the identifier of the second thread are the same, incrementing a mutex counter by 1, and accessing the hardware device by the first thread; and when the identifier of the first thread and the identifier of the second thread are different, waiting until the mutex is obtained by the first thread.