Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\select.c Create Date:2022-07-28 20:07:02
Last Modify:2020-03-18 10:25:38 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:poll_select_finish

Proto:static int poll_select_finish(struct timespec64 *end_time, void __user *p, enum poll_time_type pt_type, int ret)

Type:int

Parameter:

TypeParameterName
struct timespec64 *end_time
void __user *p
enum poll_time_typept_type
intret
303  restore_saved_sigmask_unless(ret == - start if no handler.. )
305  If Not p Then Return ret
308  If personality & STICKY_TIMEOUTS Then Go to sticky
312  If Not seconds && Not nanoseconds Then Return ret
315  ktime_get_ts64 - get the monotonic clock in timespec64 format*@ts: pointer to timespec variable* The function calculates the monotonic clock from the realtime* clock and the wall_to_monotonic offset and stores the result
316  rts = sub = lhs - rhs, in normalized form
317  If seconds < 0 Then seconds = nanoseconds = 0
322  Case pt_type == PT_TIMEVAL
326  If size of rtv > size of tv_sec + size of tv_usec Then memset( & rtv, 0, size of rtv )
328  tv_sec = seconds
329  tv_usec = nanoseconds / NSEC_PER_USEC
330  If Not copy_to_user(p, & rtv, size of rtv ) Then Return ret
333  Break
334  Case pt_type == PT_OLD_TIMEVAL
338  tv_sec = seconds
339  tv_usec = nanoseconds / NSEC_PER_USEC
340  If Not copy_to_user(p, & rtv, size of rtv ) Then Return ret
343  Break
344  Case pt_type == PT_TIMESPEC
345  If Not put_timespec64( & rts, p) Then Return ret
347  Break
348  Case pt_type == PT_OLD_TIMESPEC
349  If Not put_old_timespec32( & rts, p) Then Return ret
351  Break
352  Default
353  BUG()
363  sticky :
364  If ret == -start if no handler.. Then ret = -EINTR
366  Return ret
Caller
NameDescribe
kern_select
do_pselect
SYSCALL_DEFINE5
do_compat_select
do_compat_pselect
COMPAT_SYSCALL_DEFINE5New compat syscall for 64 bit time_t