Function report |
Source Code:kernel\resource.c |
Create Date:2022-07-28 09:05:14 |
| Last Modify:2022-05-22 11:14:39 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:allocate_resource - allocate a slot in the resource tree given range & alignment
Proto:static int reallocate_resource(struct resource *root, struct resource *old, resource_size_t newsize, struct resource_constraint *constraint)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct resource * | root | |
| struct resource * | old | |
| resource_size_t | newsize | |
| struct resource_constraint * | constraint |
| 672 | err = 0 |
| 676 | write_lock( & resource_lock) |
| 678 | If err = Find empty slot in the resource tree with the given range and* alignment constraints Then Go to out |
| 681 | If True iff r1 completely contains r2 Then |
| 687 | If child Then |
| 692 | If True iff r1 completely contains r2 Then |
| 695 | Else |
| 696 | __release_resource(old, true) |
| 701 | out : |
| 702 | write_unlock( & resource_lock) |
| 703 | Return err |
| Name | Describe |
|---|---|
| allocate_resource | allocate_resource - allocate empty slot in the resource tree given range & alignment |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |