-
Notifications
You must be signed in to change notification settings - Fork 109
Linux API Calls
Aaron Mulder edited this page Mar 29, 2016
·
4 revisions
This a list of Linux API calls made by the iwlwifi code. It's not complete; just sort of a scratch pad of what I've noticed and been unable to immediately resolve via pulling in a Linux macro or something. Bold ones have been addressed, meaning either replaced with something functional via a custom macro or I have a reasonable strategy to replace the specific call every time I come across it.
Spin Locks
- spinlock_t <<map to OSSpinLock from libkern/OSAtomic.h
- spin_lock <<map to OSSpinLockLock
- spin_unlock <<map to OSSpinLockUnlock
Wait Queues
- Functions
- wait_queue_head_t
- wait_event_timeout << (see wait.h)
- wake_up
-
IOLock Option << seems simplest
- IOLocks.h
- define wait_queue_head_t as IOLock *
- For waiting IOLockLock and IOLockSleepDeadline
- For notification IOLockWakeup
- wait_queue option
- wait_queue_t (see kern/wait_queue.h)
- wait_queue_alloc(policy)
- wait_queue_assert_wait (?) (with deadline)
- wait_queue_wakeup_all(wait_queue_t, event_t, wait_result_t)
- lck_mtx_t option
- underlying IOLock (see IOLocks.cpp)
- lck_mtx_t (see kern/locks.h)
- lck_mtx_alloc_init
- lck_mtx_lock
- lck_mtx_sleep_deadline
- thread_wakeup_prim
Other Items
- timer_list
- work_struct
- delayed_work
- flush_work (function?)
- completion variables
- mutex
- list_head << map to queue_entry from kern/queue.h Not yet sure whether this is workable; another option bsd/sys/queue.h
- rcu_read_lock Wikipedia on RCU
- rcu_read_unlock
- rcu_dereference (function or macro?)
- rcu_dereference_protected
- rcu_head << linked list of callback functions (?)
- lockdep_is_held
- atomic64_read
- atomic64_set
- kmalloc
- kfree
- vfree
- kzalloc
- kmem_cache_alloc
- kmem_cache_free
- page_address
- get_page
- free_pages
- __free_pages
- get_random_bytes
- possible_net_t
- read_pnet
- write_pnet
- device (include/linux/device.h)
- pci_device_id
- pci_driver
- pci_set_drvdata
- pci_get_drvdata
- pci_register_driver
- pci_unregister_driver
- pr_err
- sk_buff_head
- alloc_skb
- skb_put
- skb_is_nonlinear
- skb_network_header
- skb_network_offset
- kfree_skb
- get_unaligned_be16 (working with skb_ above)
- hweight32 (hamming weight = # of bits set)
- hweight64
- device_set_wakeup_enable
- acpi_handle for CONFIG_ACPI
- acpi_status
- acpi_get_handle
- acpi_string
- acpi_evaluate_object
- ACPI_ALLOCATE_BUFFER
- ACPI_FAILURE
- local_bh_enable (bottom halves)
- local_bh_disable
- va_list, va_start, va_end, va_format (iwl-debug.c)
- lock_map_acquire_read
- lock_map_release
- __releases(foo) and __release(foo)