Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Side by Side Diff: srtp/crypto/include/kernel_compat.h

Issue 889083003: Update libsrtp to upstream 1.5.0 (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libsrtp@master
Patch Set: Updated to libsrtp 1.5.1 Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « srtp/crypto/include/integers.h ('k') | srtp/crypto/include/prng.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * kernel_compat.h 2 * kernel_compat.h
3 * 3 *
4 * Compatibility stuff for building in kernel context where standard 4 * Compatibility stuff for building in kernel context where standard
5 * C headers and library are not available. 5 * C headers and library are not available.
6 * 6 *
7 * Marcus Sundberg 7 * Marcus Sundberg
8 * Ingate Systems AB 8 * Ingate Systems AB
9 */ 9 */
10 /* 10 /*
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 printk(__VA_ARGS__);\ 61 printk(__VA_ARGS__);\
62 }\ 62 }\
63 }while(0) 63 }while(0)
64 64
65 #define clock() (jiffies) 65 #define clock() (jiffies)
66 #define time(x) (jiffies) 66 #define time(x) (jiffies)
67 67
68 /* rand() implementation. */ 68 /* rand() implementation. */
69 #define RAND_MAX 32767 69 #define RAND_MAX 32767
70 70
71 static INLINE int rand(void) 71 static inline int rand(void)
72 { 72 {
73 uint32_t temp; 73 uint32_t temp;
74 get_random_bytes(&temp, sizeof(temp)); 74 get_random_bytes(&temp, sizeof(temp));
75 return temp % (RAND_MAX+1); 75 return temp % (RAND_MAX+1);
76 } 76 }
77 77
78 /* stdio/stdlib implementation. */ 78 /* stdio/stdlib implementation. */
79 #define printf(...) printk(__VA_ARGS__) 79 #define printf(...) printk(__VA_ARGS__)
80 #define exit(n) panic("%s:%d: exit(%d)\n", __FILE__, __LINE__, (n)) 80 #define exit(n) panic("%s:%d: exit(%d)\n", __FILE__, __LINE__, (n))
81 81
82 #endif /* SRTP_KERNEL_LINUX */ 82 #endif /* SRTP_KERNEL_LINUX */
83 83
84 #endif /* KERNEL_COMPAT_H */ 84 #endif /* KERNEL_COMPAT_H */
OLDNEW
« no previous file with comments | « srtp/crypto/include/integers.h ('k') | srtp/crypto/include/prng.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698