This repository has been archived by the owner on Oct 3, 2021. It is now read-only.
/
ddv_machzwd_outl_true-unreach-call_false-valid-memtrack.i
4575 lines (2851 loc) · 84.8 KB
/
ddv_machzwd_outl_true-unreach-call_false-valid-memtrack.i
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
extern void __VERIFIER_error() __attribute__ ((__noreturn__));
/* SUPPOSED TO SUCCEED */
extern void __VERIFIER_assume(int);
void __VERIFIER_assert(int expression, char* x) { if (!expression) { ERROR: __VERIFIER_error();}; return; }
int current_execution_context;
static inline void assert_context_process()
{
}
static inline void assert_context_interrupt()
{
}
int (* _ddv_module_init)(void);
void (* _ddv_module_exit)(void);
int call_ddv();
typedef int __kernel_key_t;
typedef int __kernel_mqd_t;
typedef unsigned long __kernel_ino_t;
typedef unsigned short __kernel_mode_t;
typedef unsigned short __kernel_nlink_t;
typedef long __kernel_off_t;
typedef int __kernel_pid_t;
typedef unsigned short __kernel_ipc_pid_t;
typedef unsigned short __kernel_uid_t;
typedef unsigned short __kernel_gid_t;
typedef unsigned int __kernel_size_t;
typedef int __kernel_ssize_t;
typedef int __kernel_ptrdiff_t;
typedef long __kernel_time_t;
typedef long __kernel_suseconds_t;
typedef long __kernel_clock_t;
typedef int __kernel_timer_t;
typedef int __kernel_clockid_t;
typedef int __kernel_daddr_t;
typedef char * __kernel_caddr_t;
typedef unsigned short __kernel_uid16_t;
typedef unsigned short __kernel_gid16_t;
typedef unsigned int __kernel_uid32_t;
typedef unsigned int __kernel_gid32_t;
typedef unsigned short __kernel_old_uid_t;
typedef unsigned short __kernel_old_gid_t;
typedef unsigned short __kernel_old_dev_t;
typedef unsigned short umode_t;
typedef __signed__ char __s8;
typedef unsigned char __u8;
typedef __signed__ short __s16;
typedef unsigned short __u16;
typedef __signed__ int __s32;
typedef unsigned int __u32;
typedef __signed__ long long __s64;
typedef unsigned long long __u64;
typedef signed char s8;
typedef unsigned char u8;
typedef signed short s16;
typedef unsigned short u16;
typedef signed int s32;
typedef unsigned int u32;
typedef signed long long s64;
typedef unsigned long long u64;
typedef u32 dma_addr_t;
typedef u64 dma64_addr_t;
typedef __u32 __kernel_dev_t;
typedef __kernel_dev_t dev_t;
typedef __kernel_ino_t ino_t;
typedef __kernel_mode_t mode_t;
typedef __kernel_nlink_t nlink_t;
typedef __kernel_off_t off_t;
typedef __kernel_pid_t pid_t;
typedef __kernel_daddr_t daddr_t;
typedef __kernel_key_t key_t;
typedef __kernel_suseconds_t suseconds_t;
typedef __kernel_timer_t timer_t;
typedef __kernel_clockid_t clockid_t;
typedef __kernel_mqd_t mqd_t;
typedef __kernel_uid32_t uid_t;
typedef __kernel_gid32_t gid_t;
typedef __kernel_uid16_t uid16_t;
typedef __kernel_gid16_t gid16_t;
typedef long long loff_t;
typedef __kernel_size_t size_t;
typedef __kernel_ssize_t ssize_t;
typedef __kernel_ptrdiff_t ptrdiff_t;
typedef __kernel_time_t time_t;
typedef __kernel_clock_t clock_t;
typedef __kernel_caddr_t caddr_t;
typedef unsigned char u_char;
typedef unsigned short u_short;
typedef unsigned int u_int;
typedef unsigned long u_long;
typedef unsigned char unchar;
typedef unsigned short ushort;
typedef unsigned int uint;
typedef unsigned long ulong;
typedef __u8 uint8_t;
typedef __u16 uint16_t;
typedef __u32 uint32_t;
typedef __u64 uint64_t;
typedef __u64 u_int64_t;
typedef unsigned gfp_t;
typedef unsigned long sector_t;
typedef unsigned long blkcnt_t;
typedef __u16 __le16;
typedef __u16 __be16;
typedef __u32 __le32;
typedef __u32 __be32;
typedef __u64 __le64;
typedef __u64 __be64;
void barrier(void);
int capable(int cap);
struct timespec {
time_t tv_sec;
long tv_nsec;
};
struct timeval {
time_t tv_sec;
suseconds_t tv_usec;
};
void do_gettimeofday(struct timeval *tv);
unsigned long jiffies;
static inline unsigned int jiffies_to_msecs(const unsigned long j)
{
return (1000L / 100) * j;
}
static inline unsigned int jiffies_to_usecs(const unsigned long j)
{
return (1000000L / 100) * j;
}
static inline unsigned long msecs_to_jiffies(const unsigned int m)
{
if (m > jiffies_to_msecs(((~0UL >> 1)-1)))
return ((~0UL >> 1)-1);
return (m + (1000L / 100) - 1) / (1000L / 100);
}
static inline unsigned long usecs_to_jiffies(const unsigned int u)
{
if (u > jiffies_to_usecs(((~0UL >> 1)-1)))
return ((~0UL >> 1)-1);
return (u + (1000000L / 100) - 1) / (1000000L / 100);
}
struct timer_list {
unsigned long expires;
void (*function)(unsigned long);
unsigned long data;
short __ddv_active;
short __ddv_init;
};
void init_timer(struct timer_list * timer);
void add_timer_on(struct timer_list *timer, int cpu);
void add_timer(struct timer_list *timer);
int del_timer(struct timer_list * timer);
int mod_timer(struct timer_list *timer, unsigned long expires);
typedef struct {
int init;
int locked;
} spinlock_t;
typedef struct {
int something;
} rwlock_t;
void spin_lock_init(spinlock_t *);
void spin_lock(spinlock_t *);
void spin_lock_irqsave(spinlock_t *, unsigned long);
void spin_lock_irq(spinlock_t *);
void spin_lock_bh(spinlock_t *);
void spin_unlock(spinlock_t *);
void spin_unlock_irqrestore(spinlock_t *, unsigned long);
void spin_unlock_irq(spinlock_t *);
void spin_unlock_bh(spinlock_t *);
void rmb(void);
void read_barrier_depends(void);
void wmb(void);
void mb(void);
struct list_head {
struct list_head *next, *prev;
};
static inline void INIT_LIST_HEAD(struct list_head *list)
{
list->next = list;
list->prev = list;
}
static inline void __list_add(struct list_head *new,
struct list_head *prev,
struct list_head *next)
{
next->prev = new;
new->next = next;
new->prev = prev;
prev->next = new;
}
static inline void list_add(struct list_head *new, struct list_head *head)
{
__list_add(new, head, head->next);
}
static inline void __list_del(struct list_head * prev, struct list_head * next)
{
next->prev = prev;
prev->next = next;
}
static inline void list_del_init(struct list_head *entry)
{
__list_del(entry->prev, entry->next);
INIT_LIST_HEAD(entry);
}
static inline int list_empty(const struct list_head *head)
{
return head->next == head;
}
struct task_struct;
struct task_struct *get_current(void);
struct __wait_queue {
int something;
};
typedef struct __wait_queue wait_queue_t;
struct __wait_queue_head {
int number_process_waiting;
int wakeup;
int init;
};
typedef struct __wait_queue_head wait_queue_head_t;
void init_waitqueue_head(wait_queue_head_t *q);
void prepare_to_wait(wait_queue_head_t *q, wait_queue_t *wait, int state);
void finish_wait(wait_queue_head_t *q, wait_queue_t *wait);
void wake_up(wait_queue_head_t *q);
void wake_up_all(wait_queue_head_t *q);
void wake_up_interruptible(wait_queue_head_t *q);
void add_wait_queue(wait_queue_head_t *q, wait_queue_t * wait);
void add_wait_queue_exclusive(wait_queue_head_t *q, wait_queue_t * wait);
void remove_wait_queue(wait_queue_head_t *q, wait_queue_t * wait);
int waitqueue_active(wait_queue_head_t *q);
void sleep_on(wait_queue_head_t *q);
void interruptible_sleep_on(wait_queue_head_t *q);
struct __pthread_t_struct
{
int id;
};
struct __pthread_attr_t_struct
{
int dummy;
};
struct __pthread_mutex_t_struct
{
_Bool locked;
};
struct __pthread_mutexattr_t_struct
{
int dummy;
};
struct __pthread_spinlock_t_struct
{
int dummy;
};
struct __pthread_barrier_t_struct
{
int dummy;
};
struct __pthread_barrierattr_t_struct
{
int dummy;
};
typedef struct __pthread_t_struct pthread_t;
typedef struct __pthread_attr_t_struct pthread_attr_t;
typedef struct __pthread_mutex_t_struct pthread_mutex_t;
typedef struct __pthread_mutexattr_t_struct pthread_mutexattr_t;
typedef struct __pthread_spinlock_t_struct pthread_spinlock_t;
typedef struct __pthread_barrier_t_struct pthread_barrier_t;
typedef struct __pthread_barrierattr_t_struct pthread_barrierattr_t;
enum
{
PTHREAD_CREATE_JOINABLE,
PTHREAD_CREATE_DETACHED
};
enum
{
PTHREAD_INHERIT_SCHED,
PTHREAD_EXPLICIT_SCHED
};
enum
{
PTHREAD_SCOPE_SYSTEM,
PTHREAD_SCOPE_PROCESS
};
enum
{
PTHREAD_MUTEX_TIMED_NP,
PTHREAD_MUTEX_RECURSIVE_NP,
PTHREAD_MUTEX_ERRORCHECK_NP,
PTHREAD_MUTEX_ADAPTIVE_NP,
PTHREAD_MUTEX_NORMAL = PTHREAD_MUTEX_TIMED_NP,
PTHREAD_MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE_NP,
PTHREAD_MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK_NP,
PTHREAD_MUTEX_DEFAULT = PTHREAD_MUTEX_NORMAL
};
enum
{
PTHREAD_PROCESS_PRIVATE,
PTHREAD_PROCESS_SHARED
};
enum
{
PTHREAD_RWLOCK_PREFER_READER_NP,
PTHREAD_RWLOCK_PREFER_WRITER_NP,
PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP,
PTHREAD_RWLOCK_DEFAULT_NP = PTHREAD_RWLOCK_PREFER_WRITER_NP
};
enum
{
PTHREAD_CANCEL_ENABLE,
PTHREAD_CANCEL_DISABLE
};
enum
{
PTHREAD_CANCEL_DEFERRED,
PTHREAD_CANCEL_ASYNCHRONOUS
};
pthread_t __VERIFIER_nondet_pthread_t();
extern inline int pthread_create(
pthread_t *__threadp,
__const pthread_attr_t *__attr,
void *(*__start_routine) (void *),
void *__arg);
struct sched_param;
extern pthread_t pthread_self(void);
extern int pthread_equal(pthread_t __thread1, pthread_t __thread2);
extern void pthread_exit(void *__retval);
extern int pthread_join(pthread_t __th, void **__thread_return);
extern int pthread_detach(pthread_t __th);
extern int pthread_attr_init(pthread_attr_t *__attr);
extern int pthread_attr_destroy(pthread_attr_t *__attr);
extern int pthread_attr_setdetachstate(pthread_attr_t *__attr, int __detachstate);
extern int pthread_attr_getdetachstate(__const pthread_attr_t *__attr, int *__detachstate);
extern int pthread_attr_setschedparam(pthread_attr_t *__attr, __const struct sched_param *__param);
extern int pthread_attr_getschedparam(__const pthread_attr_t *__attr, struct sched_param *__param);
extern int pthread_attr_setschedpolicy(pthread_attr_t *__attr, int __policy);
extern int pthread_attr_getschedpolicy(__const pthread_attr_t *__attr, int *__policy);
extern int pthread_attr_setinheritsched(pthread_attr_t *__attr, int __inherit);
extern int pthread_attr_getinheritsched(__const pthread_attr_t *__attr, int *__inherit);
extern int pthread_attr_setscope(pthread_attr_t *__attr, int __scope);
extern int pthread_attr_getscope(__const pthread_attr_t *__attr, int *__scope);
extern int pthread_attr_setguardsize(pthread_attr_t *__attr, size_t __guardsize);
extern int pthread_attr_getguardsize(__const pthread_attr_t *__attr, size_t *__guardsize);
extern int pthread_attr_setstackaddr(pthread_attr_t *__attr, void *__stackaddr);
extern int pthread_attr_getstackaddr(__const pthread_attr_t *__attr, void **__stackaddr);
extern int pthread_attr_setstack(pthread_attr_t *__attr, void *__stackaddr, size_t __stacksize);
extern int pthread_attr_getstack(__const pthread_attr_t *__attr,
void **__stackaddr,
size_t *__stacksize);
extern int pthread_attr_setstacksize(pthread_attr_t *__attr, size_t __stacksize);
extern int pthread_attr_getstacksize(__const pthread_attr_t *, size_t *__stacksize);
extern int pthread_getattr_np(pthread_t __th, pthread_attr_t *__attr);
extern int pthread_setschedparam(pthread_t __target_thread, int __policy,
__const struct sched_param *__param);
extern int pthread_getschedparam(pthread_t __target_thread,
int *__policy,
struct sched_param *__param);
extern int pthread_getconcurrency(void);
extern int pthread_setconcurrency(int __level);
extern int pthread_yield(void);
extern inline int pthread_mutex_init(
pthread_mutex_t *__mutex,
__const pthread_mutexattr_t *__mutex_attr)
{
pthread_mutex_t i={0};
*__mutex=i;
}
extern inline int pthread_mutex_destroy(pthread_mutex_t *__mutex)
{
}
extern int pthread_mutex_trylock(pthread_mutex_t *__mutex);
void __VERIFIER_atomic_begin();
void __VERIFIER_atomic_end();
extern inline int pthread_mutex_lock(pthread_mutex_t *__mutex)
{
__VERIFIER_HIDE:
__VERIFIER_atomic_begin();
__VERIFIER_assume(!__mutex->locked);
__mutex->locked=1;
__VERIFIER_atomic_end();
return 0;
}
extern inline int pthread_mutex_unlock(pthread_mutex_t *__mutex)
{
__mutex->locked=0;
return 0;
}
extern int pthread_spin_init(pthread_spinlock_t *__lock, int __pshared);
extern int pthread_spin_destroy(pthread_spinlock_t *__lock);
extern int pthread_spin_lock(pthread_spinlock_t *__lock);
extern int pthread_spin_trylock(pthread_spinlock_t *__lock);
extern int pthread_spin_unlock(pthread_spinlock_t *__lock);
extern int pthread_barrier_init(pthread_barrier_t *__barrier,
__const pthread_barrierattr_t *__attr, unsigned int __count);
extern int pthread_barrier_destroy(pthread_barrier_t *__barrier);
extern int pthread_barrierattr_init(pthread_barrierattr_t *__attr);
extern int pthread_barrierattr_destroy(pthread_barrierattr_t *__attr);
extern int pthread_barrierattr_getpshared(__const pthread_barrierattr_t *__attr,
int *__pshared);
extern int pthread_barrierattr_setpshared(pthread_barrierattr_t *__attr, int __pshared);
extern int pthread_barrier_wait(pthread_barrier_t *__barrier);
extern int pthread_setcancelstate(int __state, int *__oldstate);
extern int pthread_setcanceltype(int __type, int *__oldtype);
extern int pthread_cancel(pthread_t __cancelthread);
extern void pthread_testcancel(void);
extern int pthread_atfork(void (*__prepare)(void),
void (*__parent)(void),
void (*__child)(void));
extern void pthread_kill_other_threads_np(void);
void *malloc(size_t size);
short __VERIFIER_nondet_short();
unsigned short __VERIFIER_nondet_ushort();
int __VERIFIER_nondet_int();
unsigned int __VERIFIER_nondet_uint();
long __VERIFIER_nondet_long();
unsigned long __VERIFIER_nondet_ulong();
char __VERIFIER_nondet_char();
unsigned char __VERIFIER_nondet_uchar();
unsigned __VERIFIER_nondet_unsigned();
loff_t __VERIFIER_nondet_loff_t();
size_t __VERIFIER_nondet_size_t();
sector_t __VERIFIER_nondet_sector_t();
u32 __VERIFIER_nondet_u32();
char * __VERIFIER_nondet_pchar();
_Bool __VERIFIER_nondet_bool();
void noop();
void __VERIFIER_atomic_begin();
void __VERIFIER_atomic_end();
typedef int atomic_t;
static __inline__ void atomic_add(int i, atomic_t *v)
{
(*v) = (*v) + i;
}
static __inline__ void atomic_sub(int i, atomic_t *v)
{
(*v) = (*v) - i;
}
static __inline__ void atomic_inc(atomic_t *v)
{
(*v)++;
}
static __inline__ void atomic_dec(atomic_t *v)
{
(*v)--;
}
static __inline__ int atomic_dec_and_test(atomic_t *v)
{
int ret;
__VERIFIER_HIDE:
__VERIFIER_atomic_begin();
(*v)--;
if ((*v) == 0) {
ret = 1;
} else {
ret = 0;
};
__VERIFIER_atomic_end();
return ret;
}
static __inline__ int atomic_inc_and_test(atomic_t *v)
{
int ret;
__VERIFIER_HIDE:
__VERIFIER_atomic_begin();
(*v)++;
if ((*v) == 0) {
ret = 1;
} else {
ret = 0;
};
__VERIFIER_atomic_end();
return ret;
}
static __inline__ int atomic_add_negative(int i, atomic_t *v)
{
int ret;
__VERIFIER_HIDE:
__VERIFIER_atomic_begin();
(*v) = (*v) + i;
if ((*v) < 0) {
ret = 1;
} else {
ret = 0;
}
__VERIFIER_atomic_end();
return ret;
}
static __inline__ int atomic_add_return(int i, atomic_t *v)
{
return (*v) + i;
}
static __inline__ int atomic_sub_return(int i, atomic_t *v)
{
return (*v) - i;
}
unsigned long __get_free_pages(gfp_t gfp_mask, unsigned int order);
unsigned long __get_free_page(gfp_t gfp_mask);
unsigned long get_zeroed_page(gfp_t gfp_mask);
void free_pages(unsigned long addr, unsigned int order);
void free_page(unsigned long addr);
static struct page *alloc_pages_node(int nid, gfp_t gfp_mask,
unsigned int order);
struct page * alloc_pages(gfp_t gfp_mask, unsigned int order);
struct page * alloc_page(gfp_t gfp_mask);
void kfree(const void *);
void *kmalloc(size_t size, gfp_t flags);
void *kzalloc(size_t size, gfp_t flags);
unsigned int ksize(const void *);
void *memset(void *s, int c, size_t n);
extern char * strcpy(char *,const char *);
extern char * strncpy(char *,const char *, __kernel_size_t);
size_t strlcpy(char *, const char *, size_t);
extern char * strcat(char *, const char *);
extern char * strncat(char *, const char *, __kernel_size_t);
extern size_t strlcat(char *, const char *, __kernel_size_t);
extern int strcmp(const char *,const char *);
extern int strncmp(const char *,const char *,__kernel_size_t);
extern int strnicmp(const char *, const char *, __kernel_size_t);
extern char * strchr(const char *,int);
extern char * strnchr(const char *, size_t, int);
extern char * strrchr(const char *,int);
extern char * strstrip(char *);
extern char * strstr(const char *,const char *);
extern __kernel_size_t strlen(const char *);
extern __kernel_size_t strnlen(const char *,__kernel_size_t);
extern char * strpbrk(const char *,const char *);
extern char * strsep(char **,const char *);
extern __kernel_size_t strspn(const char *,const char *);
extern __kernel_size_t strcspn(const char *,const char *);
extern void * memset(void *,int,__kernel_size_t);
extern void * memcpy(void *,const void *,__kernel_size_t);
extern void * memmove(void *,const void *,__kernel_size_t);
extern void * memscan(void *,int,__kernel_size_t);
extern int memcmp(const void *,const void *,__kernel_size_t);
extern void * memchr(const void *,int,__kernel_size_t);
typedef unsigned long old_sigset_t;
typedef struct {
unsigned long sig[(64 / 32)];
} sigset_t;
typedef struct siginfo {
int something;
} siginfo_t;
void set_bit(int nr, unsigned long * addr);
int test_and_set_bit(int nr, unsigned long * addr);
int test_and_clear_bit(int nr, unsigned long * addr);
int test_and_change_bit(int nr, unsigned long* addr);
int test_bit(int nr, const void * addr);
void clear_bit(int nr, volatile unsigned long * addr);
int find_first_zero_bit(const unsigned long *addr, unsigned size);
static inline void sigfillset(sigset_t *set)
{
switch ((64 / 32)) {
default:
memset(set, -1, sizeof(sigset_t));
break;
case 2: set->sig[1] = -1;
case 1: set->sig[0] = -1;
break;
}
}
static inline void sigaddsetmask(sigset_t *set, unsigned long mask)
{
set->sig[0] |= mask;
}
static inline void sigdelsetmask(sigset_t *set, unsigned long mask)
{
set->sig[0] &= ~mask;
}
static inline int sigtestsetmask(sigset_t *set, unsigned long mask)
{
return (set->sig[0] & mask) != 0;
}
struct sighand_struct {
spinlock_t siglock;
};
struct task_struct {
long state;
pid_t pid;
char comm[16];
sigset_t blocked, real_blocked;
struct sighand_struct *sighand;
};
int signal_pending(struct task_struct *p);
void schedule(void);
long schedule_timeout(long timeout);
int need_resched(void);
extern int dequeue_signal(struct task_struct *tsk, sigset_t *mask, siginfo_t *info);