I am reading "Linux Kernel Development" by Robert Love and he wrote that the system call executes in process context and is capable of sleeping. The current pointer will refer to the current task, which is the process that issued the system call.
What I don't understand is if a system call can sleep, how does execution return to the system call? If it runs in process context, it could be awakened and re-scheduled, but user processes cannot execute in kernel space. Does the kernel create a task/process to execute the system call when it is called? I know the system call from user space causes a trap to switch to kernel mode and execute the corresponding system call, but I was under the assumption before reading this that system calls couldn't sleep and be rescheduled, but I understand why they should be able to.