#include "spinlock.h" int atomic_read(const atomic_t *v){ return v->val; } int atomic_dec_and_test(atomic_t *v){ if(v->val > 0){ v->val--; return v->val == 0; } return 0; } void atomic_inc(atomic_t *v){ v->val++; } void atomic_set(atomic_t *v, int x){ v->val = x; } void spin_lock_init(spinlock_t *lock){ *lock = (spinlock_t){}; } unsigned long _spin_lock_irqsave(spinlock_t *lock){ lock->val++; return 0; } void spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags){ lock->val--; } unsigned long _read_lock_irqsave(rwlock_t *lock){ lock->val++; return 0; } void read_unlock_irqrestore(rwlock_t *lock, unsigned long flags){ lock->val--; } unsigned long _write_lock_irqsave(rwlock_t *lock){ lock->val++; return 0; } void write_unlock_irqrestore(rwlock_t *lock, unsigned long flags){ lock->val--; } void init_MUTEX(struct semaphore *sem){ *sem = (struct semaphore){ .count = 1 }; } void down(struct semaphore *sem){ sem->count--; } void up(struct semaphore *sem){ sem->count++; } option value='chaos_calmer'>chaos_calmer upstream openwrtJames
aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/diffconfig.sh
blob: 5f9fec56000f85fb985115d3cb2f608c1fa62f7d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/sh
grep \^CONFIG_TARGET_ .config | head -n3 > tmp/.diffconfig.head
grep \^CONFIG_TARGET_DEVICE_ .config >> tmp/.diffconfig.head
grep '^CONFIG_ALL=y' .config >> tmp/.diffconfig.head
grep '^CONFIG_ALL_KMODS=y' .config >> tmp/.diffconfig.head
grep '^CONFIG_ALL_NONSHARED=y' .config >> tmp/.diffconfig.head
grep '^CONFIG_DEVEL=y' .config >> tmp/.diffconfig.head
grep '^CONFIG_TOOLCHAINOPTS=y' .config >> tmp/.diffconfig.head
grep '^CONFIG_BUSYBOX_CUSTOM=y' .config >> tmp/.diffconfig.head
grep '^CONFIG_TARGET_PER_DEVICE_ROOTFS=y' .config >> tmp/.diffconfig.head
./scripts/config/conf --defconfig=tmp/.diffconfig.head -w tmp/.diffconfig.stage1 Config.in >/dev/null
./scripts/kconfig.pl '>+' tmp/.diffconfig.stage1 .config >> tmp/.diffconfig.head
./scripts/config/conf --defconfig=tmp/.diffconfig.head -w tmp/.diffconfig.stage2 Config.in >/dev/null
./scripts/kconfig.pl '>' tmp/.diffconfig.stage2 .config >> tmp/.diffconfig.head
cat tmp/.diffconfig.head
rm -f tmp/.diffconfig tmp/.diffconfig.head