Subversion Repositories Kolibri OS

Rev

Rev 3031 | Rev 4103 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3031 Rev 3391
Line 270... Line 270...
270
 
270
 
Line 271... Line -...
271
 
-
 
272
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
-
 
273
 
-
 
274
 
-
 
275
 
-
 
276
 
-
 
277
#ifndef HAVE_ARCH_BUG
-
 
278
#define BUG() do { \
-
 
279
         printk("BUG: failure at %s:%d/%s()!\n", __FILE__, __LINE__, __FUNCTION__); \
-
 
280
       /*  panic("BUG!"); */ \
-
 
281
 } while (0)
-
 
282
#endif
-
 
283
 
-
 
284
#ifndef HAVE_ARCH_BUG_ON
-
 
285
#define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while(0)
-
 
286
#endif
271
 
287
 
272
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
288
 
273
 
289
 
274
 
290
#define MTRR_TYPE_UNCACHABLE 0
275
#define MTRR_TYPE_UNCACHABLE 0
Line 311... Line 296...
311
size_t  strlen(const char *s);
296
size_t  strlen(const char *s);
312
char *strcpy(char *s1, const char *s2);
297
char *strcpy(char *s1, const char *s2);
313
char *strncpy (char *dst, const char *src, size_t len);
298
char *strncpy (char *dst, const char *src, size_t len);
Line 314... Line 299...
314
 
299
 
-
 
300
void *malloc(size_t size);
-
 
301
void* realloc(void* oldmem, size_t bytes);
315
void *malloc(size_t size);
302
 
Line -... Line 303...
-
 
303
#define kfree free
-
 
304
 
-
 
305
static inline void *krealloc(void *p, size_t new_size, gfp_t flags)
-
 
306
{
-
 
307
    return realloc(p, new_size);
316
#define kfree free
308
}
317
 
309
 
318
static inline void *kzalloc(size_t size, uint32_t flags)
310
static inline void *kzalloc(size_t size, uint32_t flags)
319
{
311
{
320
    void *ret = malloc(size);
312
    void *ret = malloc(size);
321
    memset(ret, 0, size);
313
    memset(ret, 0, size);
Line 322... Line 314...
322
    return ret;
314
    return ret;
Line -... Line 315...
-
 
315
}
-
 
316
 
-
 
317
#define kmalloc(s,f) kzalloc((s), (f))
323
}
318
 
Line 324... Line 319...
324
 
319
 
325
#define kmalloc(s,f) kzalloc((s), (f))
320
 
Line 351... Line 346...
351
 
346
 
352
#ifndef __read_mostly
347
#ifndef __read_mostly
353
#define __read_mostly
348
#define __read_mostly
Line -... Line 349...
-
 
349
#endif
-
 
350
 
-
 
351
/**
-
 
352
 * struct callback_head - callback structure for use with RCU and task_work
-
 
353
 * @next: next update requests in a list
-
 
354
 * @func: actual update function to call after the grace period.
-
 
355
 */
-
 
356
struct callback_head {
-
 
357
        struct callback_head *next;
-
 
358
        void (*func)(struct callback_head *head);
Line 354... Line 359...
354
#endif
359
};