Lines Matching defs:object
4 * Module Name: utobject - ACPI object create/delete/size/cache routines
39 * type - ACPI Type of the new object
41 * RETURN: A new internal object, null on failure
43 * DESCRIPTION: Create and initialize a new internal object.
45 * NOTE: We always allocate the worst-case object descriptor because
48 * the most memory efficient, but the efficiency of the object
60 union acpi_operand_object *object;
66 /* Allocate the raw object descriptor */
68 object =
71 if (!object) {
74 kmemleak_not_leak(object);
81 /* These types require a secondary object */
87 acpi_ut_delete_object_desc(object);
94 /* Link the second object to the first */
96 object->common.next_object = second_object;
101 /* All others have no secondary object */
105 /* Save the object type in the object descriptor */
107 object->common.type = (u8) type;
111 object->common.reference_count = 1;
115 return_PTR(object);
124 * RETURN: Pointer to a new Package object, null on failure
126 * DESCRIPTION: Create a fully initialized package object
137 /* Create a new Package object */
166 * RETURN: Pointer to a new Integer object, null on failure
168 * DESCRIPTION: Create an initialized integer object
178 /* Create and initialize a new integer object */
195 * RETURN: Pointer to a new Buffer object, null on failure
197 * DESCRIPTION: Create a fully initialized buffer object
208 /* Create a new Buffer object */
231 /* Complete buffer object initialization */
250 * RETURN: Pointer to a new String object
252 * DESCRIPTION: Create a fully initialized string object
263 /* Create a new String object */
283 /* Complete string object initialization */
297 * PARAMETERS: object - Object to be validated
299 * RETURN: TRUE if object is valid, FALSE otherwise
305 u8 acpi_ut_valid_internal_object(void *object)
312 if (!object) {
319 switch (ACPI_GET_DESCRIPTOR_TYPE(object)) {
322 /* The object appears to be a valid union acpi_operand_object */
330 object, acpi_ut_get_descriptor_name(object)));
345 * RETURN: Pointer to newly allocated object descriptor. Null on error
347 * DESCRIPTION: Allocate a new object descriptor. Gracefully handle
355 union acpi_operand_object *object;
359 object = acpi_os_acquire_object(acpi_gbl_operand_cache);
360 if (!object) {
362 "Could not allocate an object descriptor"));
369 ACPI_SET_DESCRIPTOR_TYPE(object, ACPI_DESC_TYPE_OPERAND);
372 object, (u32) sizeof(union acpi_operand_object)));
374 return_PTR(object);
381 * PARAMETERS: object - An Acpi internal object to be deleted
385 * DESCRIPTION: Free an ACPI object descriptor or add it to the object cache
389 void acpi_ut_delete_object_desc(union acpi_operand_object *object)
391 ACPI_FUNCTION_TRACE_PTR(ut_delete_object_desc, object);
395 if (ACPI_GET_DESCRIPTOR_TYPE(object) != ACPI_DESC_TYPE_OPERAND) {
397 "%p is not an ACPI Operand object [%s]", object,
398 acpi_ut_get_descriptor_name(object)));
402 (void)acpi_os_release_object(acpi_gbl_operand_cache, object);
410 * PARAMETERS: internal_object - An ACPI operand object
416 * contain a simple object for return to an external user.
418 * The length includes the object structure plus any additional
433 /* Start with the length of the (external) Acpi object */
437 /* A NULL object is allowed, can be a legal uninitialized package element */
442 * (A NULL union acpi_object is an object of all zeroes.)
456 "where an operand object is required",
463 * The final length depends on the object type
464 * Strings and Buffers are packed right up against the parent object and
492 * Get the actual length of the full pathname to this object.
493 * The reference will be converted to the pathname to the object
512 "Cannot convert to external object - "
513 "unsupported Reference Class [%s] 0x%X in object %p",
524 ACPI_ERROR((AE_INFO, "Cannot convert to external object - "
525 "unsupported type [%s] 0x%X in object %p",
533 * Account for the space required by the object rounded up to the next
534 * multiple of the machine word size. This keeps each object aligned
566 * Simple object - just get the size (Null object/entry is handled
581 /* Package object - nothing much to do here, let the walk handle it */
601 * PARAMETERS: internal_object - An ACPI internal object
607 * contain a package object for return to an external user.
653 * PARAMETERS: internal_object - An ACPI internal object
659 * contain an object for return to an API user.