Changeset f14291b in mainline for kernel/generic/src/ddi/ddi.c
- Timestamp:
- 2010-10-19T20:55:53Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a93d79a
- Parents:
- 1882525 (diff), a7a85d16 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/generic/src/ddi/ddi.c
r1882525 rf14291b 258 258 } 259 259 260 /** Disable or enable preemption.261 *262 * @param enable If non-zero, the preemption counter will be decremented,263 * leading to potential enabling of preemption. Otherwise264 * the preemption counter will be incremented, preventing265 * preemption from occurring.266 *267 * @return Zero on success or EPERM if callers capabilities are not sufficient.268 *269 */270 unative_t sys_preempt_control(int enable)271 {272 if (!(cap_get(TASK) & CAP_PREEMPT_CONTROL))273 return EPERM;274 275 if (enable)276 preemption_enable();277 else278 preemption_disable();279 280 return 0;281 }282 283 260 /** @} 284 261 */
Note:
See TracChangeset
for help on using the changeset viewer.